feat: add loan list
This commit is contained in:
parent
fd621ef1ef
commit
b3e6ed7483
@ -21,6 +21,12 @@
|
||||
<artifactId>tigon-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.pudonghot.yo.operation.service.loanimport.annotation;
|
||||
package com.pudonghot.yo.operation.annotation;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
@ -0,0 +1,24 @@
|
||||
package com.pudonghot.yo.operation.enumeration.assignment;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.pudonghot.tigon.enumuration.LabelEnum;
|
||||
|
||||
/**
|
||||
* 分案案件状态
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 22, 2024 10:57:51
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum AssignmentStatusEnum implements LabelEnum {
|
||||
|
||||
ACTIVE("在调"),
|
||||
EXPIRE("出调"),
|
||||
STOP_COLLECT("停调"),
|
||||
|
||||
;
|
||||
|
||||
private final String label;
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.pudonghot.yo.operation.enumeration.interaction;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.pudonghot.tigon.enumuration.LabelEnum;
|
||||
|
||||
/**
|
||||
* 跟进记录结论
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 21, 2024 15:56:05
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum ConclusionEnum implements LabelEnum {
|
||||
|
||||
REPAYMENTS("已还款"),
|
||||
DEDUCT("有钱立即扣"),
|
||||
UNWILLINGNESS_INABILITY("无意愿无能力"),
|
||||
UNWILLINGNESS_ABILITY("无意愿有能力"),
|
||||
WILLINGNESS_INABILITY("有意愿无能力"),
|
||||
COMMITMENT_REPAYMENT("承诺还款(PTP)"),
|
||||
CLAIM("协商对公"),
|
||||
REDUCE("协商减免"),
|
||||
WILLINGNESS_TO_PAY("有还款意愿"),
|
||||
COMPENSATORY_INTENTION("有代偿意愿"),
|
||||
IN_COMMUNICATION("沟通中"),
|
||||
NON_SELF_ANSWER_PASS_ON("愿意转告"),
|
||||
NON_SELF_ANSWER_REFUSE("拒绝转告"),
|
||||
PASS_ON("转告"),
|
||||
REFUSE_REPAYMENT("拒绝还款(RTP)"),
|
||||
VOICE_MAIL("语音留言"),
|
||||
CUSTOMER_CALL_BACK("客户回电"),
|
||||
COMPLAINT("投诉"),
|
||||
NON_SELF_ANSWER("非本人接听"),
|
||||
THIRD_ANSWER("三方接听"),
|
||||
CHANGED_HANDS("易主"),
|
||||
UNCONNECTED("未联系上"),
|
||||
CALL_ATTEMPT_REJECTED_BY_LIMITATION("呼叫次数限制"),
|
||||
CALL_ERROR("呼叫异常"),
|
||||
OTHER("其它"),
|
||||
|
||||
;
|
||||
|
||||
private final String label;
|
||||
}
|
@ -64,6 +64,10 @@
|
||||
<groupId>com.pudonghot.yo</groupId>
|
||||
<artifactId>yo-tj-operation-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.pudonghot.yo</groupId>
|
||||
<artifactId>yo-dal</artifactId>
|
||||
</dependency>
|
||||
<!--/二方依赖-->
|
||||
|
||||
<!--Provided-->
|
||||
|
@ -1,16 +0,0 @@
|
||||
package com.pudonghot.yo.operation.dal.agent;
|
||||
|
||||
import java.util.List;
|
||||
import com.pudonghot.tigon.dal.BaseDal;
|
||||
import com.pudonghot.yo.operation.dal.agent.model.AgentDO;
|
||||
|
||||
/**
|
||||
* 调解员表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 14:18:46
|
||||
*/
|
||||
public interface Agent2Dal extends BaseDal<Long, AgentDO> {
|
||||
|
||||
List<AgentDO> listAll();
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package com.pudonghot.yo.operation.dal.agent.impl;
|
||||
|
||||
import com.pudonghot.tigon.dal.model.BaseDbEntity;
|
||||
import com.pudonghot.tigon.mybatis.Search;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.pudonghot.yo.operation.dal.agent.model.AgentDO;
|
||||
import com.pudonghot.yo.operation.dal.agent.mapper.Agent2Mapper;
|
||||
import com.pudonghot.yo.operation.dal.agent.Agent2Dal;
|
||||
import com.pudonghot.tigon.dal.impl.BaseDalImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 调解员表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 14:18:46
|
||||
*/
|
||||
@Component
|
||||
public class Agent2DalImpl
|
||||
extends BaseDalImpl<Long, AgentDO, Agent2Mapper>
|
||||
implements Agent2Dal {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<AgentDO> listAll() {
|
||||
return list(Search.of(BaseDbEntity.Fields.active, Boolean.TRUE));
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.pudonghot.yo.operation.dal.agent.mapper;
|
||||
|
||||
import com.pudonghot.tigon.mybatis.Table;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.pudonghot.tigon.mybatis.BaseMapper;
|
||||
import com.pudonghot.yo.operation.dal.agent.model.AgentDO;
|
||||
|
||||
/**
|
||||
* 调解员表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 14:18:46
|
||||
*/
|
||||
@Mapper
|
||||
@Table("agent")
|
||||
public interface Agent2Mapper extends BaseMapper<Long, AgentDO> {
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.pudonghot.yo.operation.dal.agent.mapper.Agent2Mapper">
|
||||
<!--
|
||||
/**
|
||||
* 调解员表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 14:18:46
|
||||
*/
|
||||
-->
|
||||
</mapper>
|
@ -1,74 +0,0 @@
|
||||
package com.pudonghot.yo.operation.dal.agent.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
import com.pudonghot.tigon.mybatis.UseGeneratedKeys;
|
||||
import com.pudonghot.tigon.dal.model.BaseDbEntity;
|
||||
import com.pudonghot.tigon.mybatis.NotUpdate;
|
||||
import com.pudonghot.tigon.mybatis.NotUpdateWhenNull;
|
||||
|
||||
/**
|
||||
* 调解员表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 14:18:46
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@UseGeneratedKeys
|
||||
@FieldNameConstants
|
||||
public class AgentDO extends BaseDbEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 催收员账号
|
||||
*/
|
||||
@NotUpdate
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 上级ID
|
||||
*/
|
||||
private Long superiorId;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
*/
|
||||
private Long agencyId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 手机
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 固定电话
|
||||
*/
|
||||
private String telephone;
|
||||
|
||||
/**
|
||||
* 角色
|
||||
*/
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* 岗位
|
||||
*/
|
||||
private String station;
|
||||
|
||||
/**
|
||||
* 资源点
|
||||
*/
|
||||
private String resources;
|
||||
}
|
@ -7,6 +7,7 @@ import com.pudonghot.tigon.mybatis.NotUpdate;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
import com.pudonghot.tigon.dal.model.BaseDbEntity;
|
||||
import com.pudonghot.tigon.mybatis.UseGeneratedKeys;
|
||||
import com.pudonghot.yo.operation.enumeration.assignment.AssignmentStatusEnum;
|
||||
|
||||
/**
|
||||
* 催收案件分单记录表
|
||||
@ -27,17 +28,17 @@ public class AssignmentDO extends BaseDbEntity {
|
||||
@NotUpdate
|
||||
private Long loanId;
|
||||
|
||||
/**
|
||||
* 催收员分组ID
|
||||
*/
|
||||
private Long groupId;
|
||||
|
||||
/**
|
||||
* 催收员ID
|
||||
*/
|
||||
@NotUpdate
|
||||
private Long agentId;
|
||||
|
||||
/**
|
||||
* 催收员分组ID
|
||||
*/
|
||||
private Long groupId;
|
||||
|
||||
/**
|
||||
* 协助催收员ID
|
||||
*/
|
||||
@ -46,11 +47,12 @@ public class AssignmentDO extends BaseDbEntity {
|
||||
/**
|
||||
* 催收状态:在催,出催
|
||||
*/
|
||||
private String status;
|
||||
private AssignmentStatusEnum status;
|
||||
|
||||
/**
|
||||
* 案件分配日期
|
||||
*/
|
||||
@NotUpdate
|
||||
private Date assignTime;
|
||||
|
||||
/**
|
||||
|
@ -4,10 +4,11 @@ import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
import com.pudonghot.tigon.mybatis.NotUpdate;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
import com.pudonghot.tigon.dal.model.BaseDbEntity;
|
||||
import com.pudonghot.tigon.mybatis.UseGeneratedKeys;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.ConclusionEnum;
|
||||
|
||||
/**
|
||||
* 催收记录表
|
||||
@ -28,21 +29,27 @@ public class InteractionDO extends BaseDbEntity {
|
||||
@NotUpdate
|
||||
private Long loanId;
|
||||
|
||||
/**
|
||||
* 催收员ID
|
||||
*/
|
||||
@NotUpdate
|
||||
private Long agentId;
|
||||
|
||||
/**
|
||||
* 催收方式
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 结论
|
||||
*/
|
||||
private String conclusion;
|
||||
|
||||
/**
|
||||
* 催收日期
|
||||
*/
|
||||
private Date dueDate;
|
||||
|
||||
/**
|
||||
* 结论
|
||||
*/
|
||||
private ConclusionEnum conclusion;
|
||||
|
||||
/**
|
||||
* 下次跟进时间
|
||||
*/
|
||||
@ -99,14 +106,12 @@ public class InteractionDO extends BaseDbEntity {
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* contact表主键,联系人
|
||||
* 联系人ID
|
||||
*/
|
||||
private Long contactId;
|
||||
|
||||
private String relation;
|
||||
|
||||
/**
|
||||
* 催收员ID
|
||||
* 联系人关系
|
||||
*/
|
||||
private Long agentId;
|
||||
private String relation;
|
||||
}
|
||||
|
@ -3,6 +3,9 @@ package com.pudonghot.yo.operation.dal.loan;
|
||||
import java.util.List;
|
||||
import com.pudonghot.tigon.dal.BaseDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.model.LoanDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.request.LoanQueryReqDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.response.LoanQueryRespDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.response.LoanQueryRowRespDO;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
@ -38,4 +41,12 @@ public interface LoanDal extends BaseDal<Long, LoanDO> {
|
||||
* @return rows
|
||||
*/
|
||||
Integer batchUpdate(List<Long> idList, String field, Object value);
|
||||
|
||||
/**
|
||||
* query
|
||||
*
|
||||
* @param req req
|
||||
* @return loan list
|
||||
*/
|
||||
LoanQueryRespDO query(LoanQueryReqDO req);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import lombok.val;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.HashMap;
|
||||
import java.util.Collections;
|
||||
import org.springframework.util.Assert;
|
||||
import com.pudonghot.tigon.mybatis.Search;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
@ -13,6 +14,8 @@ import com.pudonghot.tigon.dal.model.BaseDbEntity;
|
||||
import com.pudonghot.yo.operation.dal.loan.LoanDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.model.LoanDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.mapper.LoanMapper;
|
||||
import com.pudonghot.yo.operation.dal.loan.request.LoanQueryReqDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.response.LoanQueryRespDO;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
@ -63,4 +66,16 @@ public class LoanDalImpl
|
||||
update.put(BaseDbEntity.Fields.updatedTime, new Date());
|
||||
return mapper.update(update, Search.of(idList));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoanQueryRespDO query(final LoanQueryReqDO req) {
|
||||
val resp = new LoanQueryRespDO();
|
||||
val summary = mapper.querySummary(req);
|
||||
resp.setSummary(summary);
|
||||
resp.setList(summary.getTotal() > 0 ? mapper.query(req) : Collections.emptyList());
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,13 @@
|
||||
package com.pudonghot.yo.operation.dal.loan.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.pudonghot.tigon.mybatis.Table;
|
||||
import com.pudonghot.yo.operation.dal.loan.response.LoanQueryRowRespDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.response.LoanQuerySummaryRespDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.pudonghot.tigon.mybatis.BaseMapper;
|
||||
import com.pudonghot.yo.operation.dal.loan.model.LoanDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.request.LoanQueryReqDO;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
@ -22,4 +26,20 @@ public interface LoanMapper extends BaseMapper<Long, LoanDO> {
|
||||
* @return rows
|
||||
*/
|
||||
int updateRepayment(Long loanId);
|
||||
|
||||
/**
|
||||
* query loan summary
|
||||
*
|
||||
* @param req req
|
||||
* @return loan list
|
||||
*/
|
||||
LoanQuerySummaryRespDO querySummary(LoanQueryReqDO req);
|
||||
|
||||
/**
|
||||
* query loan
|
||||
*
|
||||
* @param req req
|
||||
* @return loan list
|
||||
*/
|
||||
List<LoanQueryRowRespDO> query(LoanQueryReqDO req);
|
||||
}
|
||||
|
@ -66,4 +66,304 @@
|
||||
l.overdue_days = p.overdue_days
|
||||
</update>
|
||||
|
||||
<select id="querySummary" resultType="com.pudonghot.yo.operation.dal.loan.response.LoanQuerySummaryRespDO">
|
||||
<bind name="pagingQuery" value="false"/>
|
||||
select count(t.id) total,
|
||||
sum(json_extract(t.repayment, '$.expect_total_amount')) expect_total_amount,
|
||||
sum(json_extract(t.repayment, '$.actual_total_amount')) actual_total_amount,
|
||||
sum(json_extract(t.repayment, '$.expect_principal_amount')) expect_principal_amount,
|
||||
sum(json_extract(t.repayment, '$.actual_principal_amount')) actual_principal_amount,
|
||||
|
||||
sum(json_extract(t.repayment, '$.overdue_amount')) overdue_amount,
|
||||
|
||||
sum(json_extract(t.repayment, '$.expect_interest_amount')) expect_interest_amount,
|
||||
sum(json_extract(t.repayment, '$.expect_service_amount')) expect_service_amount,
|
||||
sum(json_extract(t.repayment, '$.expect_penalty_amount')) expect_penalty_amount,
|
||||
sum(json_extract(t.repayment, '$.reduction_amount')) reduction_amount
|
||||
|
||||
<include refid="queryMain" />
|
||||
</select>
|
||||
|
||||
<select id="query" resultType="com.pudonghot.yo.operation.dal.loan.response.LoanQueryRowRespDO">
|
||||
<bind name="pagingQuery" value="true" />
|
||||
select
|
||||
t.id,
|
||||
t.contract_number,
|
||||
t.tj_contract_number,
|
||||
t.color,
|
||||
t.follow_mark,
|
||||
t.remark,
|
||||
t.overdue_days,
|
||||
t.overdue_amount,
|
||||
t.commission_amount,
|
||||
t.mediate_result,
|
||||
|
||||
t.principal_remain,
|
||||
|
||||
t.customer_name,
|
||||
t.customer_id_no,
|
||||
|
||||
t.loan_source_name,
|
||||
|
||||
t.batch_number,
|
||||
t.commission_date,
|
||||
t.commission_org,
|
||||
|
||||
t.assign_status,
|
||||
t.assign_agent_name,
|
||||
t.assign_time,
|
||||
|
||||
t.interaction ->> '$.agent_id' recent_followup_agent_id,
|
||||
t.interaction ->> '$.agent_name' recent_followup_agent_name,
|
||||
t.interaction ->> '$.followup_time' recent_followup_time,
|
||||
t.interaction ->> '$.conclusion' conclusion,
|
||||
|
||||
t.repayment ->> '$.actual_total_amount' repaid_amount,
|
||||
t.repayment ->> '$.reduction_amount' reduction_amount
|
||||
<include refid="queryMain" />
|
||||
</select>
|
||||
|
||||
<sql id="queryMain">
|
||||
<bind name="outsideCondition" value="(conclusions != null and !conclusions.isEmpty()) or (startRecentFollowupTime != null and endRecentFollowupTime != null)"/>
|
||||
from (
|
||||
select
|
||||
l.id,
|
||||
l.contract_number,
|
||||
l.tj_contract_number,
|
||||
l.color,
|
||||
l.follow_mark,
|
||||
l.remark,
|
||||
l.overdue_days,
|
||||
l.overdue_amount,
|
||||
l.overdue_amount commission_amount,
|
||||
l.mediate_result,
|
||||
|
||||
a.product_name,
|
||||
a.principal_remain,
|
||||
|
||||
c.name customer_name,
|
||||
c.id_no customer_id_no,
|
||||
|
||||
ls.loan_source_name,
|
||||
|
||||
bn.batch_number,
|
||||
bn.commission_date,
|
||||
bn.commission_org,
|
||||
|
||||
aa.status assign_status,
|
||||
aa.agent_id assign_agent_id,
|
||||
agent.name assign_agent_name,
|
||||
aa.assign_time,
|
||||
|
||||
(<include refid="queryRecentInteraction" />) interaction,
|
||||
(<include refid="queryRepaymentSum" />) repayment
|
||||
|
||||
from <include refid="table" /> l
|
||||
|
||||
join <include refid="com.pudonghot.yo.operation.dal.application.mapper.ApplicationMapper.table" /> a
|
||||
on l.id = a.loan_id
|
||||
|
||||
<if test="productName != null">
|
||||
and a.product_name = #{productName}
|
||||
</if>
|
||||
|
||||
<if test="colors != null and !colors.isEmpty()">
|
||||
and l.color in
|
||||
<foreach collection="colors" open="(" item="color" separator="," close=")">
|
||||
#{color}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="followMarks != null and !followMarks.isEmpty()">
|
||||
and l.follow_mark in
|
||||
<foreach collection="followMarks" open="(" item="followMark" separator="," close=")">
|
||||
#{followMark}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="tjContractNumbers != null and !tjContractNumbers.isEmpty()">
|
||||
and l.tj_contract_number in
|
||||
<foreach collection="tjContractNumbers" open="(" item="tjContractNum" separator="," close=")">
|
||||
#{tjContractNum}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="contractNumbers != null and !contractNumbers.isEmpty()">
|
||||
and l.contract_number in
|
||||
<foreach collection="contractNumbers" open="(" item="contractNum" separator="," close=")">
|
||||
#{contractNum}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="mediateResults != null and !mediateResults.isEmpty()">
|
||||
and l.mediate_result in
|
||||
<foreach collection="mediateResults" open="(" item="mediateResult" separator="," close=")">
|
||||
#{mediateResult}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="remark != null">
|
||||
<bind name="_remark" value="'%' + remark + '%'" />
|
||||
and l.remark like #{_remark}
|
||||
</if>
|
||||
|
||||
<if test="startOverdueDays != null and endOverdueDays != null">
|
||||
and l.overdue_days between #{startOverdueDays} and #{endOverdueDays}
|
||||
</if>
|
||||
|
||||
<if test="startOverdueAmount != null and endOverdueAmount != null">
|
||||
and l.overdue_amount between #{startOverdueAmount} and #{endOverdueAmount}
|
||||
</if>
|
||||
|
||||
join <include refid="com.pudonghot.yo.operation.dal.loan.mapper.CustomerMapper.table" /> c
|
||||
on l.id = c.loan_id
|
||||
<if test="names != null and !names.isEmpty()">
|
||||
and c.name in
|
||||
<foreach collection="names" open="(" item="name" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="mobiles != null and !mobiles.isEmpty()">
|
||||
and c.mobile in
|
||||
<foreach collection="mobiles" open="(" item="mobile" separator="," close=")">
|
||||
#{mobile}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="idNumList != null and !idNumList.isEmpty()">
|
||||
and c.id_no in
|
||||
<foreach collection="idNumList" open="(" item="idCard" separator="," close=")">
|
||||
#{idCard}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
join <include refid="com.pudonghot.yo.operation.dal.loan.mapper.LoanSourceMapper.table" /> ls
|
||||
on l.loan_source_id = ls.id
|
||||
|
||||
join <include refid="com.pudonghot.yo.operation.dal.loanimport.mapper.BatchNumberMapper.table" /> bn
|
||||
on l.import_batch_id = bn.id
|
||||
<if test="deptId != null">
|
||||
and bn.dept_id = #{deptId}
|
||||
</if>
|
||||
<if test="batchNumber != null">
|
||||
and bn.batch_number = #{batchNumber}
|
||||
</if>
|
||||
<if test="commissionOrgs != null and !commissionOrgs.isEmpty()">
|
||||
and bn.commission_org in
|
||||
<foreach collection="commissionOrgs" open="(" item="commissionOrg" separator="," close=")">
|
||||
#{commissionOrg}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="startCommissionDate != null and endCommissionDate!= null">
|
||||
and bn.commission_date between #{startCommissionDate} and #{endCommissionDate}
|
||||
</if>
|
||||
|
||||
left join <include refid="com.pudonghot.yo.operation.dal.assignment.mapper.AssignmentMapper.table" /> aa
|
||||
on l.id = aa.loan_id
|
||||
left join <include refid="com.pudonghot.yo.dal.agent.mapper.AgentMapper.table" /> agent
|
||||
on aa.agent_id = agent.id
|
||||
|
||||
where 1 = 1
|
||||
|
||||
<if test="hasAssigned != null">
|
||||
and aa.id is
|
||||
<choose>
|
||||
<when test="hasAssigned">
|
||||
not null
|
||||
</when>
|
||||
<otherwise>
|
||||
null
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
|
||||
<if test="agentIdList != null and !agentIdList.isEmpty()">
|
||||
and aa.agent_id in
|
||||
<foreach collection="agentIdList" open="(" item="agentId" separator="," close=")">
|
||||
#{agentId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="assignStatus != null">
|
||||
and aa.status = #{assignStatus}
|
||||
</if>
|
||||
|
||||
<if test="startAssignTime != null and endAssignTime != null">
|
||||
and aa.assignTime between #{startAssignTime} and #{endAssignTime}
|
||||
</if>
|
||||
|
||||
<if test="pagingQuery and !outsideCondition">
|
||||
limit #{offset}, #{limit}
|
||||
</if>
|
||||
) t
|
||||
|
||||
where 1 = 1
|
||||
<if test="conclusions != null and !conclusions.isEmpty()">
|
||||
and t.interaction ->> '$.conclusion' in
|
||||
<foreach collection="conclusions" open="(" item="conclusion" separator="," close=")">
|
||||
#{conclusion}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="startRecentFollowupTime != null and endRecentFollowupTime != null">
|
||||
and t.interaction ->> '$.recent_followup_time'
|
||||
between #{startRecentFollowupTime} and #{endRecentFollowupTime}
|
||||
</if>
|
||||
|
||||
<if test="pagingQuery and outsideCondition">
|
||||
limit #{offset}, #{limit}
|
||||
</if>
|
||||
|
||||
</sql>
|
||||
|
||||
<sql id="queryRecentInteraction">
|
||||
select json_object(
|
||||
'agent_id', i.agent_id,
|
||||
'conclusion', i.conclusion,
|
||||
'followup_time', i.created_time,
|
||||
'agent_name', a.name
|
||||
)
|
||||
from
|
||||
<include refid="com.pudonghot.yo.operation.dal.interaction.mapper.InteractionMapper.table" /> i
|
||||
left join <include refid="com.pudonghot.yo.operation.dal.interaction.mapper.InteractionMapper.table" /> i2
|
||||
on i.loan_id = i2.loan_id
|
||||
and i2.id > i.id
|
||||
|
||||
join <include refid="com.pudonghot.yo.dal.agent.mapper.AgentMapper.table" /> a
|
||||
on i.agent_id = a.id
|
||||
|
||||
where i.loan_id = l.id
|
||||
and i2.id is null
|
||||
</sql>
|
||||
|
||||
<sql id="queryRepaymentSum">
|
||||
select
|
||||
json_object(
|
||||
'expect_principal_amount', sum(expect_principal_amount),
|
||||
'actual_principal_amount', sum(actual_principal_amount),
|
||||
'expect_interest_amount', sum(expect_interest_amount),
|
||||
'actual_interest_amount', sum(actual_interest_amount),
|
||||
'expect_service_amount', sum(expect_service_amount),
|
||||
'actual_service_amount', sum(actual_service_amount),
|
||||
'expect_penalty_amount', sum(expect_penalty_amount),
|
||||
'actual_penalty_amount', sum(actual_penalty_amount),
|
||||
'reduction_amount', sum(reduction_amount),
|
||||
'expect_total_amount', sum(expect_total_amount),
|
||||
'actual_total_amount', sum(actual_total_amount),
|
||||
'overdue_amount', sum(overdue_amount),
|
||||
'total_installments', count(id),
|
||||
'paid_installments', count(if (overdue_amount = 0, 1, null)),
|
||||
'overdue_installments', count(if (overdue_amount > 0, 1, null)),
|
||||
|
||||
'current_installment', ifnull(min(if (overdue_amount > 0, installment, if (date_format(expect_repay_time, '%Y%m') = date_format(now(), '%Y%m'), installment, null))), 0),
|
||||
'current_due_date', min(if (overdue_amount > 0, date(expect_repay_time), if (date_format(expect_repay_time, '%Y%m') = date_format(now(), '%Y%m'), date(expect_repay_time), null))),
|
||||
'overdue_days', ifnull(datediff(now(), min(if (overdue_amount > 0, expect_repay_time, null))), 0),
|
||||
'status', ifnull(max(if (overdue_amount > 0, status, null)), 'PAID'),
|
||||
'prepayment_amount', ifnull(sum(if (expect_repay_time > now(), actual_total_amount, null)), 0)
|
||||
)
|
||||
|
||||
from <include refid="com.pudonghot.yo.operation.dal.loan.mapper.RepaymentMapper.table" />
|
||||
where loan_id = l.id
|
||||
group by loan_id
|
||||
</sql>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,120 @@
|
||||
package com.pudonghot.yo.operation.dal.loan.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
import com.fasterxml.jackson.annotation.JsonAlias;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.ConclusionEnum;
|
||||
import com.pudonghot.yo.operation.enumeration.assignment.AssignmentStatusEnum;
|
||||
|
||||
/**
|
||||
* 案件查询
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 21, 2024 10:48:57
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQueryReqDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer offset;
|
||||
@JsonAlias("pageSize")
|
||||
private Integer limit;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName; // done
|
||||
|
||||
private Long deptId; // done
|
||||
private List<Long> agentIdList; // done
|
||||
|
||||
private List<String> followMarks; // done
|
||||
private List<String> colors; // done
|
||||
private List<String> tjContractNumbers; // done
|
||||
private List<String> contractNumbers; // done
|
||||
private List<String> mediateResults; // done
|
||||
private String remark; // done
|
||||
|
||||
/**
|
||||
* 逾期金额-开始
|
||||
*/
|
||||
private Long startOverdueAmount; // done
|
||||
|
||||
/**
|
||||
* 逾期金额-结束
|
||||
*/
|
||||
private Long endOverdueAmount; // done
|
||||
|
||||
private List<String> names; // done
|
||||
private List<String> idNumList; // done
|
||||
private List<String> mobiles; // done
|
||||
|
||||
/**
|
||||
* 是否分案
|
||||
*/
|
||||
private Boolean hasAssigned; // done
|
||||
|
||||
/**
|
||||
* 逾期天数-开始
|
||||
*/
|
||||
private Integer startOverdueDays; // done
|
||||
|
||||
/**
|
||||
* 逾期天数-结束
|
||||
*/
|
||||
private Integer endOverdueDays; // done
|
||||
|
||||
private List<ConclusionEnum> conclusions; // done
|
||||
|
||||
/**
|
||||
* 分案日期-开始
|
||||
*/
|
||||
private Date startAssignTime; // done
|
||||
|
||||
/**
|
||||
* 分案日期-结束
|
||||
*/
|
||||
private Date endAssignTime; // done
|
||||
|
||||
/**
|
||||
* 分案状态
|
||||
*/
|
||||
private AssignmentStatusEnum assignStatus; // done;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNumber; // done
|
||||
|
||||
/**
|
||||
* 委案机构
|
||||
*/
|
||||
private List<String> commissionOrgs; // done
|
||||
|
||||
/**
|
||||
* 委案日期-开始
|
||||
*/
|
||||
private Date startCommissionDate; // done
|
||||
|
||||
/**
|
||||
* 委案日期-结束
|
||||
*/
|
||||
private Date endCommissionDate; // done
|
||||
|
||||
/**
|
||||
* 最近跟进日期-开始
|
||||
*/
|
||||
private Date startRecentFollowupTime; // done
|
||||
|
||||
/**
|
||||
* 最近跟进日期-结束
|
||||
*/
|
||||
private Date endRecentFollowupTime; // done
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.pudonghot.yo.operation.dal.loan.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.List;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 案件查询
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 21, 2024 10:48:57
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQueryRespDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private LoanQuerySummaryRespDO summary;
|
||||
private List<LoanQueryRowRespDO> list;
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.pudonghot.yo.operation.dal.loan.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.ConclusionEnum;
|
||||
import com.pudonghot.yo.operation.enumeration.assignment.AssignmentStatusEnum;
|
||||
|
||||
/**
|
||||
* 案件查询
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 21, 2024 10:48:57
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQueryRowRespDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
private String contractNumber;
|
||||
private String tjContractNumber;
|
||||
private String color;
|
||||
private String followMark;
|
||||
private String remark;
|
||||
private String customerName;
|
||||
private String customerIdNo;
|
||||
private String loanSourceName;
|
||||
private String batchNumber;
|
||||
|
||||
private String commissionOrg;
|
||||
private Date commissionDate;
|
||||
|
||||
private Long assignAgentId;
|
||||
private String assignAgentName;
|
||||
private AssignmentStatusEnum assignStatus;
|
||||
private Date assignTime;
|
||||
|
||||
private Long recentFollowupAgentId;
|
||||
private String recentFollowupAgentName;
|
||||
private Date recentFollowupTime;
|
||||
private ConclusionEnum conclusion;
|
||||
|
||||
private Long commissionAmount;
|
||||
private Long overdueAmount;
|
||||
private Long principalRemain;
|
||||
private Long repaidAmount;
|
||||
private Long reductionAmount;
|
||||
private Integer overdueDays;
|
||||
|
||||
private String mediateResult;
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.pudonghot.yo.operation.dal.loan.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 案件查询汇总
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 22, 2024 15:58:43
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQuerySummaryRespDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
/**
|
||||
* 总金额
|
||||
*/
|
||||
private Long expectTotalAmount;
|
||||
|
||||
/**
|
||||
* 已还金额
|
||||
*/
|
||||
private Long actualTotalAmount;
|
||||
|
||||
/**
|
||||
* 本金总额
|
||||
*/
|
||||
private Long expectPrincipalAmount;
|
||||
|
||||
/**
|
||||
* 已还本金
|
||||
*/
|
||||
private Long actualPrincipalAmount;
|
||||
|
||||
/**
|
||||
* 逾期金额
|
||||
*/
|
||||
private Long overdueAmount;
|
||||
|
||||
/**
|
||||
* 利息
|
||||
*/
|
||||
private Long expectInterestAmount;
|
||||
|
||||
/**
|
||||
* 服务费
|
||||
*/
|
||||
private Long expectServiceAmount;
|
||||
|
||||
/**
|
||||
* 罚息
|
||||
*/
|
||||
private Long expectPenaltyAmount;
|
||||
|
||||
/**
|
||||
* 减免金额
|
||||
*/
|
||||
private Long reductionAmount;
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.pudonghot.yo.operation.dal;
|
||||
|
||||
import com.pudonghot.tigon.mybatis.SuperMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@ -19,8 +20,8 @@ public class TestBase {
|
||||
}
|
||||
|
||||
@Slf4j
|
||||
@SpringBootApplication(scanBasePackages = "com.pudonghot.yo.operation.dal")
|
||||
@MapperScan(basePackages = "com.pudonghot.yo.operation.dal", annotationClass = Mapper.class)
|
||||
@SpringBootApplication(scanBasePackages = {"com.pudonghot.yo.dal", "com.pudonghot.yo.operation.dal"})
|
||||
@MapperScan(basePackages = {"com.pudonghot.yo.operation.dal", "com.pudonghot.yo.dal"}, markerInterface = SuperMapper.class)
|
||||
class TestDriver {
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,15 @@
|
||||
package com.pudonghot.yo.operation.dal.loan;
|
||||
|
||||
import com.pudonghot.yo.operation.dal.loan.mapper.LoanMapper;
|
||||
import com.pudonghot.yo.operation.dal.loan.request.LoanQueryReqDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.response.LoanQueryRowRespDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.response.LoanQuerySummaryRespDO;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.ConclusionEnum;
|
||||
import lombok.val;
|
||||
import org.junit.Test;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.pudonghot.yo.operation.dal.TestBase;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -14,6 +22,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
public class LoanDalTest extends TestBase {
|
||||
@Autowired
|
||||
private LoanDal dal;
|
||||
@Autowired
|
||||
private LoanMapper loanMapper;
|
||||
|
||||
@Test
|
||||
public void testLoanList() {
|
||||
@ -24,4 +34,33 @@ public class LoanDalTest extends TestBase {
|
||||
public void testUpdateRepayment() {
|
||||
dal.updateRepayment(2L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoanQuery() {
|
||||
val req = new LoanQueryReqDO();
|
||||
req.setOffset(0);
|
||||
req.setLimit(20);
|
||||
// req.setColors(Arrays.asList("#F00"));
|
||||
// req.setMobiles(Arrays.asList("13764268888"));
|
||||
// req.setNames(Arrays.asList("东煌"));
|
||||
req.setHasAssigned(true);
|
||||
req.setBatchNumber("20230909_004");
|
||||
req.setConclusions(Arrays.asList(ConclusionEnum.UNCONNECTED));
|
||||
val list = loanMapper.query(req);
|
||||
log.info("List: [{}].", list);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoanQuerySummary() {
|
||||
val req = new LoanQueryReqDO();
|
||||
req.setOffset(0);
|
||||
req.setLimit(20);
|
||||
// req.setColors(Arrays.asList("#F00"));
|
||||
// req.setMobiles(Arrays.asList("13764268888"));
|
||||
// req.setNames(Arrays.asList("东煌"));
|
||||
req.setHasAssigned(true);
|
||||
req.setBatchNumber("20230909_004");
|
||||
val resp = loanMapper.querySummary(req);
|
||||
log.info("Resp: [{}].", resp);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
mybatis:
|
||||
mapper-locations:
|
||||
- classpath*:com/pudonghot/yo/dal/*/mapper/*Mapper.xml
|
||||
- classpath*:com/pudonghot/yo/operation/dal/*/mapper/*Mapper.xml
|
||||
lazy-initialization: false
|
||||
configuration:
|
||||
|
@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="true" scan="true" scanPeriod="180 seconds">>
|
||||
|
||||
<property name="log.level" value="TRACE" />
|
||||
<property name="log.level" value="DEBUG" />
|
||||
<property name="log.dir" value="target/logs" />
|
||||
|
||||
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!--<withJansi>true</withJansi>-->
|
||||
<encoder>
|
||||
<pattern>%magenta(%d{"yyyy-MM-dd HH:mm:ss,SSS", GMT+8}) [%thread][%X{traceId}] %highlight(%-5level) %cyan(%logger{15}) - %msg %n</pattern>
|
||||
</encoder>
|
||||
|
@ -3,8 +3,10 @@ package com.pudonghot.yo.operation.service.loan;
|
||||
import com.pudonghot.tigon.service.TigonService;
|
||||
import com.pudonghot.yo.operation.service.loan.model.LoanBO;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanCreateReqBO;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanQueryReqBO;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanUpdateReqBO;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanBatchUpdateFieldReqBO;
|
||||
import com.pudonghot.yo.operation.service.loan.response.LoanQueryRespBO;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
@ -25,4 +27,12 @@ public interface LoanService
|
||||
* @return rows
|
||||
*/
|
||||
Integer batchUpdateField(LoanBatchUpdateFieldReqBO req);
|
||||
|
||||
/**
|
||||
* query
|
||||
*
|
||||
* @param req req
|
||||
* @return resp
|
||||
*/
|
||||
LoanQueryRespBO query(LoanQueryReqBO req);
|
||||
}
|
||||
|
@ -4,10 +4,13 @@ import org.springframework.stereotype.Service;
|
||||
import com.pudonghot.yo.operation.dal.loan.LoanDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.model.LoanDO;
|
||||
import com.pudonghot.tigon.service.impl.TigonServiceImpl;
|
||||
import com.pudonghot.yo.operation.service.loan.model.LoanBO;
|
||||
import com.pudonghot.yo.operation.service.loan.LoanService;
|
||||
import com.pudonghot.yo.operation.service.loan.model.LoanBO;
|
||||
import com.pudonghot.yo.operation.dal.loan.request.LoanQueryReqDO;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanQueryReqBO;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanCreateReqBO;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanUpdateReqBO;
|
||||
import com.pudonghot.yo.operation.service.loan.response.LoanQueryRespBO;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanBatchUpdateFieldReqBO;
|
||||
|
||||
/**
|
||||
@ -33,4 +36,12 @@ public class LoanServiceImpl
|
||||
public Integer batchUpdateField(final LoanBatchUpdateFieldReqBO req) {
|
||||
return dal.batchUpdate(req.getIdList(), req.getField(), req.getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoanQueryRespBO query(final LoanQueryReqBO req) {
|
||||
return beanService.convert(dal.query(beanService.convert(req, LoanQueryReqDO.class)), LoanQueryRespBO.class);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,96 @@
|
||||
package com.pudonghot.yo.operation.service.loan.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
import com.fasterxml.jackson.annotation.JsonAlias;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.ConclusionEnum;
|
||||
|
||||
/**
|
||||
* 案件查询
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 21, 2024 10:48:57
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQueryReqBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer pageIndex;
|
||||
private Integer pageSize;
|
||||
|
||||
public Integer getOffset() {
|
||||
return (pageIndex - 1) * pageSize;
|
||||
}
|
||||
|
||||
private String productName;
|
||||
private String remark;
|
||||
|
||||
private Long deptId;
|
||||
@JsonAlias("assignAccountIdList")
|
||||
private List<Long> agentIdList;
|
||||
@JsonAlias("followMarkList")
|
||||
private List<String> followMarks;
|
||||
private List<String> colors;
|
||||
@JsonAlias("contractNumber")
|
||||
private List<String> contractNumbers;
|
||||
@JsonAlias("mediateResult")
|
||||
private List<String> mediateResults;
|
||||
@JsonAlias("tjContractNumber")
|
||||
private List<String> tjContractNumbers;
|
||||
|
||||
@JsonAlias("loanAssignStatus")
|
||||
private Boolean hasAssigned;
|
||||
|
||||
private Long startOverdueAmount;
|
||||
private Long endOverdueAmount;
|
||||
|
||||
private Integer startOverdueDays;
|
||||
private Integer endOverdueDays;
|
||||
|
||||
@JsonAlias("name")
|
||||
private List<String> names;
|
||||
@JsonAlias("idNo")
|
||||
private List<String> idNumList;
|
||||
@JsonAlias("mobile")
|
||||
private List<String> mobiles;
|
||||
|
||||
private List<ConclusionEnum> conclusions;
|
||||
|
||||
/**
|
||||
* 分案日期
|
||||
*/
|
||||
private Date startAssignTime;
|
||||
|
||||
private Date endAssignTime;
|
||||
|
||||
private String batchNumber;
|
||||
private String assignStatus;
|
||||
|
||||
/**
|
||||
* 委案日期
|
||||
*/
|
||||
private Date startCommissionDate;
|
||||
|
||||
private Date endCommissionDate;
|
||||
|
||||
@JsonAlias("commissionOrg")
|
||||
private List<String> commissionOrgs;
|
||||
|
||||
/**
|
||||
* 最后跟进日期
|
||||
*/
|
||||
@JsonAlias("startFinallyFollowDate")
|
||||
private Date startRecentFollowupTime;
|
||||
|
||||
/**
|
||||
* 最后跟进日期
|
||||
*/
|
||||
@JsonAlias("endFinallyFollowDate")
|
||||
private Date endRecentFollowupTime;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.pudonghot.yo.operation.service.loan.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.List;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 案件查询
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 21, 2024 10:48:57
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQueryRespBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private LoanQuerySummaryRespBO summary;
|
||||
private List<LoanQueryRowRespBO> list;
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.pudonghot.yo.operation.service.loan.response;
|
||||
|
||||
import com.pudonghot.yo.operation.enumeration.assignment.AssignmentStatusEnum;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.ConclusionEnum;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 案件查询
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 21, 2024 10:48:57
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQueryRowRespBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
private String contractNumber;
|
||||
private String tjContractNumber;
|
||||
private String color;
|
||||
private String followMark;
|
||||
private String remark;
|
||||
private String customerName;
|
||||
private String customerIdNo;
|
||||
private String loanSourceName;
|
||||
private String batchNumber;
|
||||
|
||||
private String commissionOrg;
|
||||
private Date commissionDate;
|
||||
|
||||
private Long assignAgentId;
|
||||
private String assignAgentName;
|
||||
private AssignmentStatusEnum assignStatus;
|
||||
private Date assignTime;
|
||||
|
||||
private Long recentFollowupAgentId;
|
||||
private String recentFollowupAgentName;
|
||||
private Date recentFollowupTime;
|
||||
private ConclusionEnum conclusion;
|
||||
|
||||
private Long commissionAmount;
|
||||
private Long overdueAmount;
|
||||
private Long principalRemain;
|
||||
private Long repaidAmount;
|
||||
private Long reductionAmount;
|
||||
private Integer overdueDays;
|
||||
|
||||
private String mediateResult;
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.pudonghot.yo.operation.service.loan.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 案件查询汇总
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 22, 2024 15:58:43
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQuerySummaryRespBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
/**
|
||||
* 总金额
|
||||
*/
|
||||
private Long expectTotalAmount;
|
||||
|
||||
/**
|
||||
* 已还金额
|
||||
*/
|
||||
private Long actualTotalAmount;
|
||||
|
||||
/**
|
||||
* 本金总额
|
||||
*/
|
||||
private Long expectPrincipalAmount;
|
||||
|
||||
/**
|
||||
* 已还本金
|
||||
*/
|
||||
private Long actualPrincipalAmount;
|
||||
|
||||
/**
|
||||
* 逾期金额
|
||||
*/
|
||||
private Long overdueAmount;
|
||||
|
||||
/**
|
||||
* 利息
|
||||
*/
|
||||
private Long expectInterestAmount;
|
||||
|
||||
/**
|
||||
* 服务费
|
||||
*/
|
||||
private Long expectServiceAmount;
|
||||
|
||||
/**
|
||||
* 罚息
|
||||
*/
|
||||
private Long expectPenaltyAmount;
|
||||
|
||||
/**
|
||||
* 减免金额
|
||||
*/
|
||||
private Long reductionAmount;
|
||||
}
|
@ -18,7 +18,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import jakarta.validation.constraints.PositiveOrZero;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import com.pudonghot.yo.operation.service.loanimport.annotation.IdCard;
|
||||
import com.pudonghot.yo.operation.service.loanimport.annotation.MoneyAmount;
|
||||
import com.pudonghot.yo.operation.annotation.MoneyAmount;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
|
@ -10,7 +10,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import jakarta.validation.constraints.PositiveOrZero;
|
||||
import com.pudonghot.yo.operation.service.loanimport.annotation.MoneyAmount;
|
||||
import com.pudonghot.yo.operation.annotation.MoneyAmount;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
|
@ -2,6 +2,7 @@ package com.pudonghot.yo.operation.controller.loan;
|
||||
|
||||
import lombok.val;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import com.pudonghot.tigon.kit.bean.BeanService;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import com.pudonghot.tigon.dal.model.BaseDbEntity;
|
||||
@ -12,6 +13,9 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import com.pudonghot.tigon.web.controller.annotation.ApiMeta;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanQueryReqBO;
|
||||
import com.pudonghot.yo.operation.controller.loan.request.LoanQueryReqVO;
|
||||
import com.pudonghot.yo.operation.controller.loan.response.LoanQueryRespVO;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanBatchUpdateFieldReqBO;
|
||||
import com.pudonghot.yo.operation.controller.loan.request.LoanBatchUpdateColorReqVO;
|
||||
import com.pudonghot.yo.operation.controller.loan.request.LoanBatchUpdateRemarkReqVO;
|
||||
@ -102,4 +106,14 @@ public class LoanController {
|
||||
reqBO.setValue(Boolean.FALSE);
|
||||
return loanService.batchUpdateField(reqBO);
|
||||
}
|
||||
|
||||
@ApiMeta("案件管理列表")
|
||||
@RequestMapping("/query")
|
||||
public LoanQueryRespVO query(
|
||||
@Valid
|
||||
@NotNull
|
||||
final LoanQueryReqVO req) {
|
||||
|
||||
return beanService.convert(loanService.query(beanService.convert(req, LoanQueryReqBO.class)), LoanQueryRespVO.class);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,63 @@
|
||||
package com.pudonghot.yo.operation.controller.loan.annotation;
|
||||
|
||||
import lombok.val;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.JsonSerializer;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
||||
|
||||
/**
|
||||
* 财务数据JSON序列化格式化,保留2位小数
|
||||
*
|
||||
* {"a": 20} -> {"a": "20.00"}
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Apr 24, 2022 10:09:17
|
||||
*/
|
||||
@Documented
|
||||
@JacksonAnnotationsInside
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@JsonSerialize(using = FinanceValue.ValueSerializer.class)
|
||||
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.TYPE, ElementType.PARAMETER})
|
||||
public @interface FinanceValue {
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Apr 24, 2022 09:58:02
|
||||
*/
|
||||
class ValueSerializer extends JsonSerializer<Number> {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void serialize(final Number value,
|
||||
final JsonGenerator gen,
|
||||
final SerializerProvider serializers) throws IOException {
|
||||
|
||||
if (value == null) {
|
||||
//write the word 'null' if there's no value available
|
||||
gen.writeNull();
|
||||
return;
|
||||
}
|
||||
|
||||
val format = "%,.2f";
|
||||
|
||||
if (value instanceof Long) {
|
||||
val divide = BigDecimal.valueOf((Long) value).divide(BigDecimal.valueOf(100));
|
||||
gen.writeString(String.format(format, divide.doubleValue()));
|
||||
return;
|
||||
}
|
||||
|
||||
gen.writeString(String.format(format, value));
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.pudonghot.yo.operation.controller.loan.annotation;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.JsonSerializer;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
||||
|
||||
/**
|
||||
* 案件是否分案
|
||||
*
|
||||
* ASSIGNED -> true
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 22, 2024 11:09:57
|
||||
*/
|
||||
@Documented
|
||||
@JacksonAnnotationsInside
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@JsonSerialize(using = LoanHasAssigned.ValueSerializer.class)
|
||||
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.TYPE, ElementType.PARAMETER})
|
||||
public @interface LoanHasAssigned {
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Apr 24, 2022 09:58:02
|
||||
*/
|
||||
class ValueSerializer extends JsonSerializer<String> {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void serialize(final String value,
|
||||
final JsonGenerator gen,
|
||||
final SerializerProvider serializers) throws IOException {
|
||||
|
||||
if (StringUtils.isBlank(value)) {
|
||||
gen.writeNull();
|
||||
return;
|
||||
}
|
||||
|
||||
gen.writeBoolean("ASSIGNED".equals(value));
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.pudonghot.yo.operation.controller.loan.annotation;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.JsonSerializer;
|
||||
import com.pudonghot.tigon.kit.util.NumberPrivacyUtils;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
||||
|
||||
/**
|
||||
* mask mobile number
|
||||
* 13788888709 -> *******8709
|
||||
* @author Donghuang
|
||||
* @date Sep 13, 2024 16:49:29
|
||||
*/
|
||||
@Documented
|
||||
@JacksonAnnotationsInside
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@JsonSerialize(using = MaskedNum.ValueSerializer.class)
|
||||
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.TYPE, ElementType.PARAMETER})
|
||||
public @interface MaskedNum {
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Apr 24, 2022 09:58:02
|
||||
*/
|
||||
class ValueSerializer extends JsonSerializer<String> {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void serialize(final String value,
|
||||
final JsonGenerator gen,
|
||||
final SerializerProvider serializers) throws IOException {
|
||||
|
||||
if (StringUtils.isBlank(value)) {
|
||||
//write the word 'null' if there's no value available
|
||||
gen.writeNull();
|
||||
return;
|
||||
}
|
||||
|
||||
gen.writeString(NumberPrivacyUtils.mask(value));
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.pudonghot.yo.operation.controller.loan.annotation;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.JsonSerializer;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
||||
|
||||
/**
|
||||
* 查询参数序列化,输入拆分为List
|
||||
*
|
||||
* "13764268888 13764268889" -> ["13764268888", "13764268889"]
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 21, 2024 11:07:10
|
||||
*/
|
||||
@Documented
|
||||
@JacksonAnnotationsInside
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@JsonSerialize(using = QueryParamList.ValueSerializer.class)
|
||||
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.TYPE, ElementType.PARAMETER})
|
||||
public @interface QueryParamList {
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Apr 24, 2022 09:58:02
|
||||
*/
|
||||
class ValueSerializer extends JsonSerializer<String> {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void serialize(final String value,
|
||||
final JsonGenerator gen,
|
||||
final SerializerProvider serializers) throws IOException {
|
||||
|
||||
if (StringUtils.isBlank(value)) {
|
||||
gen.writeNull();
|
||||
return;
|
||||
}
|
||||
|
||||
gen.writeObject(value.split("\\W"));
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,135 @@
|
||||
package com.pudonghot.yo.operation.controller.loan.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import com.pudonghot.tigon.annotation.Trim;
|
||||
import jakarta.validation.constraints.Positive;
|
||||
import com.pudonghot.yo.operation.annotation.MoneyAmount;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.ConclusionEnum;
|
||||
import com.pudonghot.yo.operation.controller.loan.annotation.QueryParamList;
|
||||
import com.pudonghot.yo.operation.controller.loan.annotation.LoanHasAssigned;
|
||||
import com.pudonghot.yo.operation.enumeration.assignment.AssignmentStatusEnum;
|
||||
|
||||
/**
|
||||
* 案件查询
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 21, 2024 10:48:57
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQueryReqVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Positive
|
||||
private Integer pageIndex = 1;
|
||||
@Positive
|
||||
@Max(1024)
|
||||
private Integer pageSize = 30;
|
||||
|
||||
@Positive
|
||||
private Long deptId;
|
||||
|
||||
@Positive
|
||||
@MoneyAmount
|
||||
private Double startOverdueAmount;
|
||||
@Positive
|
||||
@MoneyAmount
|
||||
private Double endOverdueAmount;
|
||||
|
||||
@Positive
|
||||
private Integer startOverdueDays;
|
||||
@Positive
|
||||
private Integer endOverdueDays;
|
||||
|
||||
private List<String> colors;
|
||||
|
||||
@Trim
|
||||
@QueryParamList
|
||||
private String name;
|
||||
@Trim
|
||||
@QueryParamList
|
||||
private String idNo;
|
||||
@Trim
|
||||
@QueryParamList
|
||||
private String mobile;
|
||||
|
||||
@Trim
|
||||
@QueryParamList
|
||||
private String contractNumber;
|
||||
|
||||
/**
|
||||
* 跟进结果
|
||||
*/
|
||||
private List<ConclusionEnum> conclusions;
|
||||
|
||||
/**
|
||||
* 分案日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startAssignTime;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endAssignTime;
|
||||
|
||||
@Trim
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 案件状态
|
||||
*/
|
||||
private AssignmentStatusEnum assignStatus;
|
||||
|
||||
/**
|
||||
* 委案日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startCommissionDate;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endCommissionDate;
|
||||
|
||||
/**
|
||||
* 分案调解员ID
|
||||
*/
|
||||
private List<Long> assignAccountIdList;
|
||||
|
||||
private List<String> followMarkList;
|
||||
|
||||
/**
|
||||
* 最后跟进日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startFinallyFollowDate;
|
||||
|
||||
/**
|
||||
* 最后跟进日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endFinallyFollowDate;
|
||||
|
||||
@Trim
|
||||
@QueryParamList
|
||||
private String tjContractNumber;
|
||||
|
||||
@Trim
|
||||
private String productName;
|
||||
private List<String> commissionOrg;
|
||||
private List<String> mediateResult;
|
||||
|
||||
@Trim
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否分案
|
||||
*/
|
||||
@LoanHasAssigned
|
||||
private String loanAssignStatus;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.pudonghot.yo.operation.controller.loan.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.List;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 案件查询
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 21, 2024 10:48:57
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQueryRespVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private LoanQuerySummaryRespVO summary;
|
||||
private List<LoanQueryRowRespVO> list;
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.pudonghot.yo.operation.controller.loan.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import com.pudonghot.tigon.web.controller.annotation.ViewDate;
|
||||
import com.pudonghot.yo.operation.controller.loan.annotation.MaskedNum;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.ConclusionEnum;
|
||||
import com.pudonghot.yo.operation.controller.loan.annotation.FinanceValue;
|
||||
import com.pudonghot.yo.operation.enumeration.assignment.AssignmentStatusEnum;
|
||||
|
||||
/**
|
||||
* 案件查询
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 21, 2024 10:48:57
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQueryRowRespVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
private String contractNumber;
|
||||
private String tjContractNumber;
|
||||
private String color;
|
||||
private String followMark;
|
||||
private String remark;
|
||||
private String customerName;
|
||||
@MaskedNum
|
||||
private String customerIdNo;
|
||||
private String loanSourceName;
|
||||
private String batchNumber;
|
||||
|
||||
private String commissionOrg;
|
||||
@ViewDate
|
||||
private Date commissionDate;
|
||||
|
||||
private Long assignAgentId;
|
||||
private String assignAgentName;
|
||||
private AssignmentStatusEnum assignStatus;
|
||||
@ViewDate
|
||||
private Date assignTime;
|
||||
|
||||
private Long recentFollowupAgentId;
|
||||
private String recentFollowupAgentName;
|
||||
@ViewDate
|
||||
private Date recentFollowupTime;
|
||||
private ConclusionEnum conclusion;
|
||||
|
||||
@FinanceValue
|
||||
private Long commissionAmount;
|
||||
@FinanceValue
|
||||
private Long overdueAmount;
|
||||
@FinanceValue
|
||||
private Long principalRemain;
|
||||
@FinanceValue
|
||||
private Long repaidAmount;
|
||||
@FinanceValue
|
||||
private Long reductionAmount;
|
||||
private Integer overdueDays;
|
||||
|
||||
private String mediateResult;
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.pudonghot.yo.operation.controller.loan.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
import com.pudonghot.yo.operation.controller.loan.annotation.FinanceValue;
|
||||
|
||||
/**
|
||||
* 案件查询汇总
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 22, 2024 15:58:43
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanQuerySummaryRespVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
/**
|
||||
* 总金额
|
||||
*/
|
||||
@FinanceValue
|
||||
private Long expectTotalAmount;
|
||||
|
||||
/**
|
||||
* 已还金额
|
||||
*/
|
||||
@FinanceValue
|
||||
private Long actualTotalAmount;
|
||||
|
||||
/**
|
||||
* 本金总额
|
||||
*/
|
||||
@FinanceValue
|
||||
private Long expectPrincipalAmount;
|
||||
|
||||
/**
|
||||
* 已还本金
|
||||
*/
|
||||
@FinanceValue
|
||||
private Long actualPrincipalAmount;
|
||||
|
||||
/**
|
||||
* 逾期金额
|
||||
*/
|
||||
@FinanceValue
|
||||
private Long overdueAmount;
|
||||
|
||||
/**
|
||||
* 利息
|
||||
*/
|
||||
@FinanceValue
|
||||
private Long expectInterestAmount;
|
||||
|
||||
/**
|
||||
* 服务费
|
||||
*/
|
||||
@FinanceValue
|
||||
private Long expectServiceAmount;
|
||||
|
||||
/**
|
||||
* 罚息
|
||||
*/
|
||||
@FinanceValue
|
||||
private Long expectPenaltyAmount;
|
||||
|
||||
/**
|
||||
* 减免金额
|
||||
*/
|
||||
@FinanceValue
|
||||
private Long reductionAmount;
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.pudonghot.yo.operation.misc;
|
||||
|
||||
import lombok.val;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.junit.Test;
|
||||
import lombok.ToString;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.pudonghot.yo.operation.TestBase;
|
||||
import com.pudonghot.tigon.kit.bean.BeanService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.pudonghot.yo.operation.controller.loan.annotation.FinanceValue;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 22, 2024 17:45:39
|
||||
*/
|
||||
@Slf4j
|
||||
public class FinanceValueTest extends TestBase {
|
||||
|
||||
@Autowired
|
||||
private BeanService beanService;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public static class Model {
|
||||
@FinanceValue
|
||||
private Long value;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPrint() {
|
||||
val model = new Model();
|
||||
model.setValue(10000103L);
|
||||
log.info("Value: [{}].", beanService.serialize(model));
|
||||
|
||||
model.setValue(22010000103L);
|
||||
log.info("Value: [{}].", beanService.serialize(model));
|
||||
|
||||
model.setValue(3322010000101L);
|
||||
log.info("Value: [{}].", beanService.serialize(model));
|
||||
model.setValue(9993322010000110L);
|
||||
log.info("Value: [{}].", beanService.serialize(model));
|
||||
|
||||
model.setValue(Long.MAX_VALUE);
|
||||
log.info("Value: [{}].", beanService.serialize(model));
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user