Compare commits
3 Commits
007b6599b9
...
9de37aed9d
Author | SHA1 | Date | |
---|---|---|---|
|
9de37aed9d | ||
|
b3e6ed7483 | ||
|
fd621ef1ef |
4
deploy
4
deploy
@ -70,6 +70,10 @@ if [[ "$2" = 'zj' ]]; then
|
||||
elif [[ "$2" = 'yhp' ]]; then
|
||||
SERVICE_HOME=/opt/application/${APP}
|
||||
MVN_PROFILE=yhp
|
||||
elif [[ "$2" = 'daily' ]]; then
|
||||
SERVER=xiandou@gz-dev
|
||||
SERVICE_HOME=/opt/application/${APP}
|
||||
MVN_PROFILE=default
|
||||
elif [[ "$2" = 'prod' ]]; then
|
||||
SERVER=xiandou@cy-crm
|
||||
SERVICE_HOME=/opt/application/${APP}
|
||||
|
@ -11,6 +11,7 @@ public class FileSizeUtils {
|
||||
|
||||
/**
|
||||
* human readable bytes
|
||||
*
|
||||
* @param bytes bytes
|
||||
* @return human readable
|
||||
*/
|
||||
|
@ -1,8 +1,18 @@
|
||||
package com.pudonghot.yo.util;
|
||||
|
||||
import lombok.val;
|
||||
import lombok.Setter;
|
||||
import lombok.Getter;
|
||||
import java.util.List;
|
||||
import lombok.ToString;
|
||||
import java.util.Iterator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.stream.Collector;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BinaryOperator;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
@ -28,4 +38,69 @@ public class ListUtils {
|
||||
consumer.accept(list.subList(i, Math.min(size, i + batch)));
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> void eachBatch(
|
||||
final Iterable<T> it,
|
||||
final int batch,
|
||||
final Consumer<List<T>> consumer) {
|
||||
|
||||
val iterator = it.iterator();
|
||||
Stream.<T>generate(() -> null)
|
||||
.takeWhile(x -> iterator.hasNext())
|
||||
.map(e -> iterator.next())
|
||||
.collect(partitionBySize(batch, Collectors.toList())).forEach(consumer);
|
||||
}
|
||||
|
||||
static <T, A, R> Collector<T, ?, R> partitionBySize(final int batchSize,
|
||||
final Collector<List<T>, A, R> downstream) {
|
||||
return Collector.of(() -> new Accumulator<>(
|
||||
batchSize,
|
||||
downstream.supplier().get(),
|
||||
downstream.accumulator()::accept
|
||||
),
|
||||
(acc, value) -> acc.add(value),
|
||||
(acc1, acc2) -> acc1.combine(acc2, downstream.combiner()),
|
||||
acc -> {
|
||||
if (!acc.values.isEmpty()) {
|
||||
downstream.accumulator().accept(acc.downstreamAccumulator, acc.values);
|
||||
}
|
||||
return downstream.finisher().apply(acc.downstreamAccumulator);
|
||||
},
|
||||
Collector.Characteristics.UNORDERED);
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
static class Accumulator<T, A> {
|
||||
private final List<T> values = new ArrayList<>();
|
||||
|
||||
private final int batchSize;
|
||||
private A downstreamAccumulator;
|
||||
private final BiConsumer<A, List<T>> batchFullListener;
|
||||
|
||||
public Accumulator(final int batchSize,
|
||||
final A downstreamAccumulator,
|
||||
final BiConsumer<A, List<T>> batchFullListener) {
|
||||
|
||||
this.batchSize = batchSize;
|
||||
this.downstreamAccumulator = downstreamAccumulator;
|
||||
this.batchFullListener = batchFullListener;
|
||||
}
|
||||
|
||||
public void add(final T value) {
|
||||
values.add(value);
|
||||
if (values.size() == batchSize) {
|
||||
batchFullListener.accept(downstreamAccumulator, new ArrayList<>(values));
|
||||
values.clear();
|
||||
}
|
||||
}
|
||||
|
||||
public Accumulator<T, A> combine(final Accumulator<T, A> other,
|
||||
final BinaryOperator<A> accumulatorCombiner) {
|
||||
this.downstreamAccumulator = accumulatorCombiner.apply(downstreamAccumulator, other.downstreamAccumulator);
|
||||
other.values.forEach(this::add);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,15 @@
|
||||
package com.pudonghot.yo.util;
|
||||
|
||||
import lombok.val;
|
||||
import org.junit.Test;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Sep 13, 2020 10:25:44
|
||||
@ -14,10 +19,18 @@ public class ListUtilsTest {
|
||||
|
||||
@Test
|
||||
public void testEachBatch() {
|
||||
List<Long> list = new ArrayList<>(100);
|
||||
for (long i = 0; i < 100; i++) {
|
||||
list.add(i);
|
||||
}
|
||||
val list = IntStream.range(0, 100)
|
||||
.mapToObj(i -> i)
|
||||
.collect(toList());
|
||||
ListUtils.eachBatch(list, 8, sub -> log.info("{}", sub));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEachBatch2() {
|
||||
val list = IntStream.range(0, 100)
|
||||
.mapToObj(i -> i)
|
||||
.collect(toList());
|
||||
|
||||
ListUtils.eachBatch(list, 8, sub -> log.info("{}", sub));
|
||||
}
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="WARN">
|
||||
<Properties>
|
||||
<Property name="log.level">DEBUG</Property>
|
||||
<Property name="log.dir">.logs</Property>
|
||||
<Property name="pattern">%-d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%t][%c{1}] %m%n</Property>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%highlight{%-d{yyyy-MM-dd HH:mm:ss,SSS}}{FATAL=magenta, ERROR=magenta, WARN=magenta, INFO=magenta, DEBUG=magenta, TRACE=magenta} %highlight{%-5p}{FATAL=red blink, ERROR=red, WARN=yellow bold, INFO=black, DEBUG=green bold, TRACE=blue} [%t][%highlight{%c{1.}}{FATAL=cyan, ERROR=cyan, WARN=cyan, INFO=cyan, DEBUG=cyan, TRACE=cyan}] %m%n"/>
|
||||
</Console>
|
||||
<RollingFile name="File"
|
||||
fileName="${log.dir}/app.log"
|
||||
filePattern="${log.dir}/$${date:yyyy-MM}/app-%d{yyyy-MM-dd}-%i.log">
|
||||
<PatternLayout pattern="${pattern}" />
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy />
|
||||
<SizeBasedTriggeringPolicy size="16 MB" />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="32" />
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Logger name="org.springframework" level="INFO" additivity="false">
|
||||
<AppenderRef ref="File" />
|
||||
</Logger>
|
||||
<Logger name="org.apache" level="WARN" additivity="false">
|
||||
<AppenderRef ref="File" />
|
||||
</Logger>
|
||||
<Logger name="org.hibernate.validator" level="WARN" additivity="false">
|
||||
<AppenderRef ref="File" />
|
||||
</Logger>
|
||||
<Root level="${log.level}" additivity="false">
|
||||
<AppenderRef ref="File" level="${log.level}" />
|
||||
<AppenderRef ref="Console" level="${log.level}" />
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
@ -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("在调"),
|
||||
STOP("停调"),
|
||||
EXPIRE("出调"),
|
||||
|
||||
;
|
||||
|
||||
private final String label;
|
||||
}
|
@ -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 AssignmentTypeEnum implements LabelEnum {
|
||||
|
||||
MANUAL("手动"),
|
||||
AUTOMATIC("自动"),
|
||||
AVERAGE("平均"),
|
||||
|
||||
;
|
||||
|
||||
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;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.pudonghot.yo.operation.enumeration.interaction;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.pudonghot.tigon.enumuration.LabelEnum;
|
||||
|
||||
/**
|
||||
* 跟进记录操作类型
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 14:21:30
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum HandelCategoryEnum implements LabelEnum {
|
||||
|
||||
MANUAL("人工"),
|
||||
SYSTEM("系统"),
|
||||
|
||||
;
|
||||
|
||||
private final String label;
|
||||
}
|
@ -1,20 +1,21 @@
|
||||
package com.pudonghot.yo.operation.enumeration.customer;
|
||||
package com.pudonghot.yo.operation.enumeration.interaction;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.pudonghot.tigon.enumuration.LabelEnum;
|
||||
|
||||
/**
|
||||
* 跟进记录类型
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 10, 2024 11:05:03
|
||||
* @date Oct 23, 2024 11:32:53
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum GenderEnum implements LabelEnum {
|
||||
public enum InteractionTypeEnum implements LabelEnum {
|
||||
|
||||
M("男"),
|
||||
F("女"),
|
||||
U("未知"),
|
||||
PHONE("电话"),
|
||||
MESSAGE("短信"),
|
||||
|
||||
;
|
||||
|
@ -64,6 +64,14 @@
|
||||
<groupId>com.pudonghot.yo</groupId>
|
||||
<artifactId>yo-tj-operation-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.pudonghot.tigon</groupId>
|
||||
<artifactId>tigon-cms-dal</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;
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
package com.pudonghot.yo.operation.dal.assignment;
|
||||
|
||||
import com.pudonghot.yo.operation.dal.assignment.model.AssignmentDO;
|
||||
import java.util.Collection;
|
||||
import com.pudonghot.tigon.dal.BaseDal;
|
||||
import com.pudonghot.yo.operation.dal.assignment.model.AssignmentDO;
|
||||
import com.pudonghot.yo.operation.dal.assignment.request.AssignReqDO;
|
||||
|
||||
/**
|
||||
* 催收案件分单记录表
|
||||
@ -10,4 +12,20 @@ import com.pudonghot.tigon.dal.BaseDal;
|
||||
* @date Oct 01, 2024 14:19:37
|
||||
*/
|
||||
public interface AssignmentDal extends BaseDal<Long, AssignmentDO> {
|
||||
|
||||
/**
|
||||
* 出催
|
||||
*
|
||||
* @param loanIdList loan id list
|
||||
* @return rows
|
||||
*/
|
||||
Integer checkOut(Collection<Long> loanIdList);
|
||||
|
||||
/**
|
||||
* 分案
|
||||
*
|
||||
* @param req req
|
||||
* @return rows
|
||||
*/
|
||||
Integer assign(Collection<AssignReqDO> req);
|
||||
}
|
||||
|
@ -1,10 +1,14 @@
|
||||
package com.pudonghot.yo.operation.dal.assignment.impl;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.pudonghot.yo.operation.dal.assignment.model.AssignmentDO;
|
||||
import com.pudonghot.yo.operation.dal.assignment.mapper.AssignmentMapper;
|
||||
import com.pudonghot.yo.operation.dal.assignment.AssignmentDal;
|
||||
import java.util.Collection;
|
||||
import com.pudonghot.tigon.mybatis.Search;
|
||||
import com.pudonghot.tigon.dal.impl.BaseDalImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.pudonghot.tigon.mybatis.util.EntityUtils;
|
||||
import com.pudonghot.yo.operation.dal.assignment.AssignmentDal;
|
||||
import com.pudonghot.yo.operation.dal.assignment.model.AssignmentDO;
|
||||
import com.pudonghot.yo.operation.dal.assignment.request.AssignReqDO;
|
||||
import com.pudonghot.yo.operation.dal.assignment.mapper.AssignmentMapper;
|
||||
|
||||
/**
|
||||
* 催收案件分单记录表
|
||||
@ -16,4 +20,21 @@ import com.pudonghot.tigon.dal.impl.BaseDalImpl;
|
||||
public class AssignmentDalImpl
|
||||
extends BaseDalImpl<Long, AssignmentDO, AssignmentMapper>
|
||||
implements AssignmentDal {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Integer checkOut(final Collection<Long> loanIdList) {
|
||||
return update(EntityUtils.updateMap(new BatchDisableDO()),
|
||||
Search.of(AssignmentDO.Fields.loanId, loanIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Integer assign(final Collection<AssignReqDO> req) {
|
||||
return mapper.assign(req);
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,13 @@
|
||||
package com.pudonghot.yo.operation.dal.assignment.mapper;
|
||||
|
||||
import com.pudonghot.tigon.mybatis.Table;
|
||||
import com.pudonghot.yo.operation.dal.assignment.request.AssignReqDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.pudonghot.tigon.mybatis.BaseMapper;
|
||||
import com.pudonghot.yo.operation.dal.assignment.model.AssignmentDO;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 催收案件分单记录表
|
||||
*
|
||||
@ -14,4 +17,12 @@ import com.pudonghot.yo.operation.dal.assignment.model.AssignmentDO;
|
||||
@Mapper
|
||||
@Table("assignment")
|
||||
public interface AssignmentMapper extends BaseMapper<Long, AssignmentDO> {
|
||||
|
||||
/**
|
||||
* 分案
|
||||
*
|
||||
* @param req req
|
||||
* @return rows
|
||||
*/
|
||||
Integer assign(Collection<AssignReqDO> req);
|
||||
}
|
||||
|
@ -10,4 +10,30 @@
|
||||
* @date Oct 01, 2024 14:19:37
|
||||
*/
|
||||
-->
|
||||
|
||||
<insert id="assign">
|
||||
insert into <include refid="table" />
|
||||
(loan_id, agent_id, status, assign_time, assign_type, expect_expire_date)
|
||||
select l.id, m.id, 'ACTIVE', now(), 'MANUAL', bn.withdraw_date
|
||||
from <include refid="com.pudonghot.yo.operation.dal.loan.mapper.LoanMapper.table" /> l
|
||||
|
||||
join <include refid="com.pudonghot.yo.operation.dal.loanimport.mapper.BatchNumberMapper.table" /> bn
|
||||
on l.import_batch_id = bn.id
|
||||
|
||||
join (
|
||||
select null loan_id, null agent_id
|
||||
<foreach collection="collection" item="it">
|
||||
union select #{it.loanId}, #{it.agentId}
|
||||
</foreach>
|
||||
) t
|
||||
on l.id = t.loan_id
|
||||
|
||||
join <include refid="com.pudonghot.tigon.cms.dal.member.mapper.MemberMapper.table" /> m
|
||||
on m.id = t.agent_id
|
||||
|
||||
left join <include refid="table" /> a
|
||||
on l.id = a.loan_id
|
||||
and a.active = 1
|
||||
where a.id is null
|
||||
</insert>
|
||||
</mapper>
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.pudonghot.yo.operation.dal.assignment.model;
|
||||
|
||||
import com.pudonghot.yo.operation.enumeration.assignment.AssignmentTypeEnum;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
@ -7,6 +8,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,31 +29,29 @@ public class AssignmentDO extends BaseDbEntity {
|
||||
@NotUpdate
|
||||
private Long loanId;
|
||||
|
||||
/**
|
||||
* 催收员分组ID
|
||||
*/
|
||||
private Long groupId;
|
||||
|
||||
/**
|
||||
* 催收员ID
|
||||
*/
|
||||
@NotUpdate
|
||||
private Long agentId;
|
||||
|
||||
/**
|
||||
* 协助催收员ID
|
||||
*/
|
||||
private Long assistantAgentId;
|
||||
|
||||
/**
|
||||
* 催收状态:在催,出催
|
||||
*/
|
||||
private String status;
|
||||
private AssignmentStatusEnum status;
|
||||
|
||||
/**
|
||||
* 案件分配日期
|
||||
*/
|
||||
@NotUpdate
|
||||
private Date assignTime;
|
||||
|
||||
/**
|
||||
* 分案方式
|
||||
*/
|
||||
@NotUpdate
|
||||
private AssignmentTypeEnum assignType;
|
||||
|
||||
/**
|
||||
* 预计出催日期
|
||||
*/
|
||||
@ -63,7 +63,13 @@ public class AssignmentDO extends BaseDbEntity {
|
||||
private Date actualExpireDate;
|
||||
|
||||
/**
|
||||
* 分案方式
|
||||
* 催收员分组ID
|
||||
*/
|
||||
private String assignType;
|
||||
private Long groupId;
|
||||
|
||||
/**
|
||||
* 协助催收员ID
|
||||
*/
|
||||
private Long assistantAgentId;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
package com.pudonghot.yo.operation.dal.assignment.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
/**
|
||||
* 手动分案
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 27, 2024 10:56:14
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(of = "loanId")
|
||||
public class AssignReqDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long loanId;
|
||||
private Long agentId;
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
package com.pudonghot.yo.operation.dal.interaction;
|
||||
|
||||
import com.pudonghot.yo.operation.dal.interaction.model.InteractionDO;
|
||||
import java.util.List;
|
||||
import com.pudonghot.tigon.dal.BaseDal;
|
||||
import com.pudonghot.yo.operation.dal.interaction.model.InteractionDO;
|
||||
import com.pudonghot.yo.operation.dal.interaction.response.InteractionAgentDO;
|
||||
|
||||
/**
|
||||
* 催收记录表
|
||||
@ -10,4 +12,12 @@ import com.pudonghot.tigon.dal.BaseDal;
|
||||
* @date Oct 01, 2024 14:19:55
|
||||
*/
|
||||
public interface InteractionDal extends BaseDal<Long, InteractionDO> {
|
||||
|
||||
/**
|
||||
* agents
|
||||
*
|
||||
* @param loanId loan id
|
||||
* @return agents
|
||||
*/
|
||||
List<InteractionAgentDO> agents(Long loanId);
|
||||
}
|
||||
|
@ -1,10 +1,22 @@
|
||||
package com.pudonghot.yo.operation.dal.interaction.impl;
|
||||
|
||||
import lombok.val;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.List;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
import com.pudonghot.tigon.mybatis.Search;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.pudonghot.tigon.dal.impl.BaseDalImpl;
|
||||
import com.pudonghot.tigon.dal.model.BaseDbEntity;
|
||||
import com.pudonghot.tigon.dal.request.ListDalReq;
|
||||
import com.pudonghot.yo.operation.dal.interaction.InteractionDal;
|
||||
import com.pudonghot.yo.operation.dal.interaction.model.InteractionDO;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.ConclusionEnum;
|
||||
import com.pudonghot.yo.operation.dal.interaction.mapper.InteractionMapper;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.InteractionTypeEnum;
|
||||
import com.pudonghot.yo.operation.dal.interaction.response.InteractionAgentDO;
|
||||
|
||||
/**
|
||||
* 催收记录表
|
||||
@ -16,4 +28,58 @@ import com.pudonghot.yo.operation.dal.interaction.mapper.InteractionMapper;
|
||||
public class InteractionDalImpl
|
||||
extends BaseDalImpl<Long, InteractionDO, InteractionMapper>
|
||||
implements InteractionDal {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<InteractionAgentDO> agents(final Long loanId) {
|
||||
return mapper.agents(loanId);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void beforeList(final ListDalReq req, final Search search) {
|
||||
search.desc(BaseDbEntity.Fields.id);
|
||||
val params = beanService.convert(req, ListReqParam.class);
|
||||
search.eq(InteractionDO.Fields.loanId, params.getLoanId());
|
||||
notNull(params::getAgentId, v -> search.eq(InteractionDO.Fields.agentId, v));
|
||||
notNull(params::getType, v -> search.eq(InteractionDO.Fields.type, v));
|
||||
notNull(params::getConclusion, v -> search.eq(InteractionDO.Fields.conclusion, v));
|
||||
notBlank(params::getRemark, v -> search.contains(BaseDbEntity.Fields.remark, v));
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
static class ListReqParam implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 案件ID
|
||||
*/
|
||||
private Long loanId;
|
||||
|
||||
/**
|
||||
* 调解员
|
||||
*/
|
||||
private Long agentId;
|
||||
|
||||
/**
|
||||
* 催收方式
|
||||
*/
|
||||
private InteractionTypeEnum type;
|
||||
|
||||
/**
|
||||
* 结论
|
||||
*/
|
||||
private ConclusionEnum conclusion;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
package com.pudonghot.yo.operation.dal.interaction.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.pudonghot.tigon.mybatis.Table;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.pudonghot.tigon.mybatis.BaseMapper;
|
||||
import com.pudonghot.yo.operation.dal.interaction.model.InteractionDO;
|
||||
import com.pudonghot.yo.operation.dal.interaction.response.InteractionAgentDO;
|
||||
|
||||
/**
|
||||
* 催收记录表
|
||||
@ -14,4 +16,12 @@ import com.pudonghot.yo.operation.dal.interaction.model.InteractionDO;
|
||||
@Mapper
|
||||
@Table("interaction")
|
||||
public interface InteractionMapper extends BaseMapper<Long, InteractionDO> {
|
||||
|
||||
/**
|
||||
* interaction agents
|
||||
*
|
||||
* @param loanId loan id
|
||||
* @return agents
|
||||
*/
|
||||
List<InteractionAgentDO> agents(Long loanId);
|
||||
}
|
||||
|
@ -10,4 +10,15 @@
|
||||
* @date Oct 01, 2024 14:19:55
|
||||
*/
|
||||
-->
|
||||
|
||||
<select id="agents" resultType="com.pudonghot.yo.operation.dal.interaction.response.InteractionAgentDO">
|
||||
select a.id, a.name, a.active
|
||||
from
|
||||
<include refid="com.pudonghot.tigon.cms.dal.member.mapper.MemberMapper.table" /> a
|
||||
join <include refid="table" /> i
|
||||
on a.id = i.agent_id
|
||||
and i.loan_id = #{loanId}
|
||||
and a.deleted = 0
|
||||
and i.deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -1,13 +1,16 @@
|
||||
package com.pudonghot.yo.operation.dal.interaction.model;
|
||||
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.HandelCategoryEnum;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.InteractionTypeEnum;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 催收记录表
|
||||
@ -29,20 +32,26 @@ public class InteractionDO extends BaseDbEntity {
|
||||
private Long loanId;
|
||||
|
||||
/**
|
||||
* 催收方式
|
||||
* 催收员ID
|
||||
*/
|
||||
private String type;
|
||||
@NotUpdate
|
||||
private Long agentId;
|
||||
|
||||
/**
|
||||
* 结论
|
||||
* 催收方式
|
||||
*/
|
||||
private String conclusion;
|
||||
private InteractionTypeEnum type;
|
||||
|
||||
/**
|
||||
* 催收日期
|
||||
*/
|
||||
private Date dueDate;
|
||||
|
||||
/**
|
||||
* 结论
|
||||
*/
|
||||
private ConclusionEnum conclusion;
|
||||
|
||||
/**
|
||||
* 下次跟进时间
|
||||
*/
|
||||
@ -51,7 +60,7 @@ public class InteractionDO extends BaseDbEntity {
|
||||
/**
|
||||
* 操作类别:内部人工;内部自动
|
||||
*/
|
||||
private String handleCategory;
|
||||
private HandelCategoryEnum handleCategory;
|
||||
|
||||
/**
|
||||
* 是否有效联络: 有效;无效
|
||||
@ -99,14 +108,12 @@ public class InteractionDO extends BaseDbEntity {
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* contact表主键,联系人
|
||||
* 联系人ID
|
||||
*/
|
||||
private Long contactId;
|
||||
|
||||
private String relation;
|
||||
|
||||
/**
|
||||
* 催收员ID
|
||||
* 联系人关系
|
||||
*/
|
||||
private Long agentId;
|
||||
private String relation;
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.pudonghot.yo.operation.dal.interaction.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 11:37:23
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class InteractionAgentDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
}
|
@ -3,6 +3,8 @@ package com.pudonghot.yo.operation.dal.loan;
|
||||
import com.pudonghot.tigon.dal.BaseDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.model.BankCardDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 银行卡绑定信息表
|
||||
*
|
||||
@ -18,4 +20,12 @@ public interface BankCardDal extends BaseDal<Long, BankCardDO> {
|
||||
* @return rows
|
||||
*/
|
||||
Integer removeByLoanId(Long loanId);
|
||||
|
||||
/**
|
||||
* list by loan id
|
||||
*
|
||||
* @param loanId loan id
|
||||
* @return bank cards
|
||||
*/
|
||||
List<BankCardDO> listByLoanId(Long loanId);
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ package com.pudonghot.yo.operation.dal.loan;
|
||||
import com.pudonghot.tigon.dal.BaseDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.model.ContactDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户联系人表
|
||||
*
|
||||
@ -18,4 +20,12 @@ public interface ContactDal extends BaseDal<Long, ContactDO> {
|
||||
* @return rows
|
||||
*/
|
||||
Integer removeByLoanId(Long loanId);
|
||||
|
||||
/**
|
||||
* list by loan id
|
||||
*
|
||||
* @param loanId loan id
|
||||
* @return contacts
|
||||
*/
|
||||
List<ContactDO> listByLoanId(Long loanId);
|
||||
}
|
||||
|
@ -1,7 +1,11 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
@ -27,4 +31,22 @@ public interface LoanDal extends BaseDal<Long, LoanDO> {
|
||||
* @return loan
|
||||
*/
|
||||
LoanDO findBySourceIdAndBizKey(Long sourceId, String bizKey);
|
||||
|
||||
/**
|
||||
* 批量更新字段
|
||||
*
|
||||
* @param idList id list
|
||||
* @param field field
|
||||
* @param value value
|
||||
* @return rows
|
||||
*/
|
||||
Integer batchUpdate(List<Long> idList, String field, Object value);
|
||||
|
||||
/**
|
||||
* query
|
||||
*
|
||||
* @param req req
|
||||
* @return loan list
|
||||
*/
|
||||
LoanQueryRespDO query(LoanQueryReqDO req);
|
||||
}
|
||||
|
@ -1,40 +0,0 @@
|
||||
package com.pudonghot.yo.operation.dal.loan;
|
||||
|
||||
import com.pudonghot.yo.operation.dal.loan.model.LoanSourceDO;
|
||||
import com.pudonghot.tigon.dal.BaseDal;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 案件来源表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 14:20:47
|
||||
*/
|
||||
public interface LoanSourceDal extends BaseDal<Long, LoanSourceDO> {
|
||||
|
||||
/**
|
||||
* find by code
|
||||
*
|
||||
* @param code code
|
||||
* @return loan source
|
||||
*/
|
||||
LoanSourceDO findByCode(String code);
|
||||
|
||||
/**
|
||||
* find by name
|
||||
*
|
||||
* @param name name
|
||||
* @return loan source
|
||||
*/
|
||||
LoanSourceDO findByName(String name);
|
||||
|
||||
/**
|
||||
* list by names
|
||||
*
|
||||
* @param names name
|
||||
* @return loan sources
|
||||
*/
|
||||
List<LoanSourceDO> listByNames(Collection<String> names);
|
||||
}
|
@ -1,11 +1,12 @@
|
||||
package com.pudonghot.yo.operation.dal.loan.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.pudonghot.tigon.mybatis.Search;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.pudonghot.tigon.dal.impl.BaseDalImpl;
|
||||
import com.pudonghot.yo.operation.dal.loan.BankCardDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.model.BankCardDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.mapper.BankCardMapper;
|
||||
import com.pudonghot.yo.operation.dal.loan.BankCardDal;
|
||||
import com.pudonghot.tigon.dal.impl.BaseDalImpl;
|
||||
|
||||
/**
|
||||
* 银行卡绑定信息表
|
||||
@ -25,4 +26,12 @@ public class BankCardDalImpl
|
||||
public Integer removeByLoanId(final Long loanId) {
|
||||
return mapper.delete(Search.of(BankCardDO.Fields.loanId, loanId));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<BankCardDO> listByLoanId(final Long loanId) {
|
||||
return list(Search.of(BankCardDO.Fields.loanId, loanId));
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
package com.pudonghot.yo.operation.dal.loan.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.pudonghot.tigon.mybatis.Search;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.pudonghot.tigon.dal.impl.BaseDalImpl;
|
||||
import com.pudonghot.yo.operation.dal.loan.ContactDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.model.ContactDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.mapper.ContactMapper;
|
||||
import com.pudonghot.yo.operation.dal.loan.ContactDal;
|
||||
import com.pudonghot.tigon.dal.impl.BaseDalImpl;
|
||||
|
||||
/**
|
||||
* 客户联系人表
|
||||
@ -25,4 +26,12 @@ public class ContactDalImpl
|
||||
public Integer removeByLoanId(final Long loanId) {
|
||||
return mapper.delete(Search.of(ContactDO.Fields.loanId, loanId));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<ContactDO> listByLoanId(final Long loanId) {
|
||||
return list(Search.of(ContactDO.Fields.loanId, loanId));
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,21 @@
|
||||
package com.pudonghot.yo.operation.dal.loan.impl;
|
||||
|
||||
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;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.pudonghot.tigon.dal.impl.BaseDalImpl;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
@ -34,4 +44,38 @@ public class LoanDalImpl
|
||||
return find(Search.of(LoanDO.Fields.loanSourceId, sourceId)
|
||||
.eq(LoanDO.Fields.contractNumber, bizKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Integer batchUpdate(final List<Long> idList,
|
||||
final String field,
|
||||
final Object value) {
|
||||
|
||||
Assert.state(ArrayUtils.contains(
|
||||
new String[] { BaseDbEntity.Fields.active,
|
||||
BaseDbEntity.Fields.remark,
|
||||
LoanDO.Fields.color,
|
||||
LoanDO.Fields.followMark }, field),
|
||||
() -> "Invalid update field [" + field + "]");
|
||||
|
||||
val update = new HashMap<String, Object>();
|
||||
update.put(field, value);
|
||||
update.put(BaseDbEntity.Fields.updatedBy, getMemberId());
|
||||
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,51 +0,0 @@
|
||||
package com.pudonghot.yo.operation.dal.loan.impl;
|
||||
|
||||
import com.pudonghot.tigon.mybatis.Search;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.pudonghot.tigon.dal.impl.BaseDalImpl;
|
||||
import com.pudonghot.tigon.dal.model.BaseDbEntity;
|
||||
import com.pudonghot.yo.operation.dal.loan.LoanSourceDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.model.LoanSourceDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.mapper.LoanSourceMapper;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 案件来源表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 14:20:47
|
||||
*/
|
||||
@Component
|
||||
public class LoanSourceDalImpl
|
||||
extends BaseDalImpl<Long, LoanSourceDO, LoanSourceMapper>
|
||||
implements LoanSourceDal {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoanSourceDO findByCode(final String code) {
|
||||
return find(Search.of(LoanSourceDO.Fields.loanSourceCode, code)
|
||||
.isTrue(BaseDbEntity.Fields.active));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoanSourceDO findByName(final String name) {
|
||||
return find(Search.of(LoanSourceDO.Fields.loanSourceName, name)
|
||||
.isTrue(BaseDbEntity.Fields.active));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<LoanSourceDO> listByNames(final Collection<String> names) {
|
||||
return list(Search.of(LoanSourceDO.Fields.loanSourceName, names)
|
||||
.isTrue(BaseDbEntity.Fields.active));
|
||||
}
|
||||
}
|
@ -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,321 @@
|
||||
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.dept_id,
|
||||
t.dept_name,
|
||||
|
||||
t.assign_status,
|
||||
t.assign_agent_id,
|
||||
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.value loan_source_name,
|
||||
|
||||
bn.batch_number,
|
||||
bn.commission_date,
|
||||
bn.commission_org,
|
||||
|
||||
bn.dept_id,
|
||||
dept.value dept_name,
|
||||
|
||||
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.tigon.cms.dal.dict.mapper.DictMapper.table" /> ls
|
||||
on l.loan_source_id = ls.id
|
||||
and ls.deleted = 0
|
||||
|
||||
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>
|
||||
|
||||
join <include refid="com.pudonghot.tigon.cms.dal.dict.mapper.DictMapper.table" /> dept
|
||||
on bn.dept_id = dept.id
|
||||
and dept.deleted = 0
|
||||
|
||||
left join <include refid="com.pudonghot.yo.operation.dal.assignment.mapper.AssignmentMapper.table" /> aa
|
||||
on l.id = aa.loan_id
|
||||
and aa.deleted = 0
|
||||
and aa.active = 1
|
||||
|
||||
left join <include refid="com.pudonghot.tigon.cms.dal.member.mapper.MemberMapper.table" /> agent
|
||||
on aa.agent_id = agent.id
|
||||
and agent.deleted = 0
|
||||
|
||||
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
|
||||
join <include refid="com.pudonghot.tigon.cms.dal.member.mapper.MemberMapper.table" /> a
|
||||
on i.agent_id = a.id
|
||||
and a.deleted = 0
|
||||
|
||||
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
|
||||
|
||||
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>
|
||||
|
@ -1,17 +0,0 @@
|
||||
package com.pudonghot.yo.operation.dal.loan.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.loan.model.LoanSourceDO;
|
||||
|
||||
/**
|
||||
* 案件来源表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 14:20:47
|
||||
*/
|
||||
@Mapper
|
||||
@Table("loan_source")
|
||||
public interface LoanSourceMapper extends BaseMapper<Long, LoanSourceDO> {
|
||||
}
|
@ -2,11 +2,12 @@ package com.pudonghot.yo.operation.dal.loan.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
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.customer.GenderEnum;
|
||||
import com.pudonghot.tigon.cms.common.enumeration.GenderEnum;
|
||||
|
||||
/**
|
||||
* 客户表
|
||||
@ -37,6 +38,16 @@ public class CustomerDO extends BaseDbEntity {
|
||||
*/
|
||||
private String idNo;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private GenderEnum gender;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
private Date birthday;
|
||||
|
||||
/**
|
||||
* 手机
|
||||
*/
|
||||
@ -47,21 +58,11 @@ public class CustomerDO extends BaseDbEntity {
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private GenderEnum gender;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
private String birthday;
|
||||
|
||||
/**
|
||||
* 户籍地址
|
||||
*/
|
||||
|
@ -96,4 +96,14 @@ public class LoanDO extends BaseDbEntity {
|
||||
* 逾期天数
|
||||
*/
|
||||
private Integer overdueDays;
|
||||
|
||||
/**
|
||||
* 跟进标识
|
||||
*/
|
||||
private String followMark;
|
||||
|
||||
/**
|
||||
* 调解码
|
||||
*/
|
||||
private String tjContractNumber;
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
package com.pudonghot.yo.operation.dal.loan.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;
|
||||
|
||||
/**
|
||||
* 案件来源表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 14:20:47
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@UseGeneratedKeys
|
||||
@FieldNameConstants
|
||||
public class LoanSourceDO extends BaseDbEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 渠道数据源代码
|
||||
*/
|
||||
@NotUpdate
|
||||
private String loanSourceCode;
|
||||
|
||||
/**
|
||||
* 渠道数据源名称
|
||||
*/
|
||||
private String loanSourceName;
|
||||
}
|
@ -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,58 @@
|
||||
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 deptId;
|
||||
private String deptName;
|
||||
|
||||
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;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.pudonghot.yo.operation.dal.mediator;
|
||||
|
||||
import com.pudonghot.tigon.dal.BaseDal;
|
||||
import com.pudonghot.yo.operation.dal.mediator.model.MediatorDO;
|
||||
|
||||
/**
|
||||
* 站点调解员
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 10:54:29
|
||||
*/
|
||||
public interface MediatorDal extends BaseDal<Long, MediatorDO> {
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.pudonghot.yo.operation.dal.mediator.impl;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.pudonghot.yo.operation.dal.mediator.model.MediatorDO;
|
||||
import com.pudonghot.yo.operation.dal.mediator.mapper.MediatorMapper;
|
||||
import com.pudonghot.yo.operation.dal.mediator.MediatorDal;
|
||||
import com.pudonghot.tigon.dal.impl.BaseDalImpl;
|
||||
|
||||
/**
|
||||
* 站点调解员
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 10:54:29
|
||||
*/
|
||||
@Component
|
||||
public class MediatorDalImpl
|
||||
extends BaseDalImpl<Long, MediatorDO, MediatorMapper>
|
||||
implements MediatorDal {
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.pudonghot.yo.operation.dal.mediator.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.mediator.model.MediatorDO;
|
||||
|
||||
/**
|
||||
* 站点调解员
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 10:54:29
|
||||
*/
|
||||
@Mapper
|
||||
@Table("tj_mediator")
|
||||
public interface MediatorMapper extends BaseMapper<Long, MediatorDO> {
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
<?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.loan.mapper.LoanSourceMapper">
|
||||
<mapper namespace="com.pudonghot.yo.operation.dal.mediator.mapper.MediatorMapper">
|
||||
<!--
|
||||
/**
|
||||
* 案件来源表
|
||||
* 站点调解员
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 14:20:47
|
||||
* @date Oct 15, 2024 10:54:29
|
||||
*/
|
||||
-->
|
||||
</mapper>
|
@ -0,0 +1,75 @@
|
||||
package com.pudonghot.yo.operation.dal.mediator.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
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.tigon.mybatis.NotUpdateWhenNull;
|
||||
import com.pudonghot.tigon.cms.common.enumeration.GenderEnum;
|
||||
|
||||
/**
|
||||
* 站点调解员
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 10:54:29
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@UseGeneratedKeys
|
||||
@FieldNameConstants
|
||||
public class MediatorDO extends BaseDbEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@NotUpdateWhenNull
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 性别:M/F
|
||||
*/
|
||||
@NotUpdateWhenNull
|
||||
private GenderEnum gender;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 认证机构(法院)
|
||||
*/
|
||||
@NotUpdateWhenNull
|
||||
private String certificationInstitute;
|
||||
|
||||
/**
|
||||
* 调解案件数量
|
||||
*/
|
||||
@NotUpdateWhenNull
|
||||
private Integer numMediate;
|
||||
|
||||
/**
|
||||
* 调解成功
|
||||
*/
|
||||
@NotUpdateWhenNull
|
||||
private Integer numSuccess;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
private Integer ordinal;
|
||||
|
||||
/**
|
||||
* 元数据,扩展数据
|
||||
*/
|
||||
private String metadata;
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
@NotUpdate
|
||||
private String uuid;
|
||||
}
|
@ -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 {
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,31 @@
|
||||
package com.pudonghot.yo.operation.dal.assignment;
|
||||
|
||||
import com.pudonghot.yo.operation.dal.TestBase;
|
||||
import com.pudonghot.yo.operation.dal.assignment.request.AssignReqDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.LoanDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.mapper.LoanMapper;
|
||||
import com.pudonghot.yo.operation.dal.loan.request.LoanQueryReqDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import lombok.val;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 11:25:34
|
||||
*/
|
||||
@Slf4j
|
||||
public class AssignmentDalTest extends TestBase {
|
||||
@Autowired
|
||||
private AssignmentDal dal;
|
||||
|
||||
@Test
|
||||
public void testAssign() {
|
||||
val assignReqDO = new AssignReqDO();
|
||||
assignReqDO.setLoanId(1L);
|
||||
assignReqDO.setAgentId(1L);
|
||||
dal.assign(Arrays.asList(assignReqDO));
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.pudonghot.yo.operation.dal.auth;
|
||||
|
||||
import com.pudonghot.tigon.dal.hook.AuthHook;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 11:49:23
|
||||
*/
|
||||
@Component
|
||||
public class AuthHookMock extends AuthHook<Long> {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Long doGetMemberId() {
|
||||
return 1L;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Long doGetTenantId() {
|
||||
return 1L;
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.pudonghot.yo.operation.dal.interaction;
|
||||
|
||||
import lombok.val;
|
||||
import org.junit.Test;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.pudonghot.yo.operation.dal.TestBase;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 11:25:34
|
||||
*/
|
||||
@Slf4j
|
||||
public class InteractionDalTest extends TestBase {
|
||||
@Autowired
|
||||
private InteractionDal dal;
|
||||
|
||||
@Test
|
||||
public void testAgents() {
|
||||
val agents = dal.agents(2L);
|
||||
log.info("Agents: [{}].", agents);
|
||||
}
|
||||
}
|
@ -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,7 @@
|
||||
mybatis:
|
||||
mapper-locations:
|
||||
- classpath*:com/pudonghot/tigon/cms/dal/*/mapper/*Mapper.xml
|
||||
- classpath*:com/pudonghot/yo/dal/*/mapper/*Mapper.xml
|
||||
- classpath*:com/pudonghot/yo/operation/dal/*/mapper/*Mapper.xml
|
||||
lazy-initialization: false
|
||||
configuration:
|
||||
@ -23,4 +25,4 @@ tigon:
|
||||
mybatis:
|
||||
# quotation-mark: "`"
|
||||
cms:
|
||||
table-prefix: br_
|
||||
table-prefix: tj
|
||||
|
@ -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>
|
||||
|
@ -0,0 +1,29 @@
|
||||
package com.pudonghot.yo.operation.service.assignment;
|
||||
|
||||
import com.pudonghot.tigon.service.TigonService;
|
||||
import com.pudonghot.yo.operation.service.assignment.model.AssignmentBO;
|
||||
import com.pudonghot.yo.operation.service.assignment.request.AssignmentCreateReqBO;
|
||||
import com.pudonghot.yo.operation.service.assignment.request.AssignmentImportReqBO;
|
||||
import com.pudonghot.yo.operation.service.assignment.request.AssignmentUpdateReqBO;
|
||||
import com.pudonghot.yo.operation.service.assignment.response.AssignmentImportRespBO;
|
||||
|
||||
/**
|
||||
* 催收案件分单记录表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:49:03
|
||||
*/
|
||||
public interface AssignmentService
|
||||
extends TigonService<Long,
|
||||
AssignmentBO,
|
||||
AssignmentCreateReqBO,
|
||||
AssignmentUpdateReqBO> {
|
||||
|
||||
/**
|
||||
* assignment import
|
||||
*
|
||||
* @param req req
|
||||
* @return resp
|
||||
*/
|
||||
AssignmentImportRespBO assignmentImport(AssignmentImportReqBO req);
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
package com.pudonghot.yo.operation.service.assignment.impl;
|
||||
|
||||
import lombok.val;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import java.util.stream.Collectors;
|
||||
import com.pudonghot.yo.util.ListUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.pudonghot.tigon.cms.dal.dict.DictDal;
|
||||
import com.pudonghot.tigon.file.util.StreamUtils;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.pudonghot.yo.operation.dal.loan.LoanDal;
|
||||
import com.alibaba.excel.read.listener.ReadListener;
|
||||
import com.pudonghot.tigon.cms.dal.member.MemberDal;
|
||||
import com.pudonghot.tigon.cms.dal.member.model.MemberDO;
|
||||
import com.pudonghot.tigon.service.impl.TigonServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.pudonghot.yo.operation.dal.assignment.AssignmentDal;
|
||||
import com.pudonghot.yo.operation.dal.assignment.model.AssignmentDO;
|
||||
import com.pudonghot.yo.operation.dal.assignment.request.AssignReqDO;
|
||||
import com.pudonghot.yo.operation.service.assignment.AssignmentService;
|
||||
import com.pudonghot.yo.operation.service.assignment.model.AssignmentBO;
|
||||
import com.pudonghot.yo.operation.service.assignment.impl.reader.ReadContext;
|
||||
import com.pudonghot.yo.operation.service.assignment.request.AssignmentCreateReqBO;
|
||||
import com.pudonghot.yo.operation.service.assignment.request.AssignmentUpdateReqBO;
|
||||
import com.pudonghot.yo.operation.service.assignment.request.AssignmentImportReqBO;
|
||||
import com.pudonghot.yo.operation.service.assignment.response.AssignmentImportRespBO;
|
||||
|
||||
/**
|
||||
* 催收案件分单记录表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:49:03
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class AssignmentServiceImpl
|
||||
extends TigonServiceImpl<Long,
|
||||
AssignmentBO,
|
||||
AssignmentCreateReqBO,
|
||||
AssignmentUpdateReqBO,
|
||||
AssignmentDO,
|
||||
AssignmentDal>
|
||||
implements AssignmentService {
|
||||
|
||||
@Value("${yo.tj.loan-source.category-code}")
|
||||
private String loanSourceCategory;
|
||||
|
||||
@Autowired
|
||||
private LoanDal loanDal;
|
||||
@Autowired
|
||||
private DictDal dictDal;
|
||||
@Autowired
|
||||
private MemberDal memberDal;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public AssignmentImportRespBO assignmentImport(final AssignmentImportReqBO req) {
|
||||
val resp = new AssignmentImportRespBO();
|
||||
|
||||
StreamUtils.openStream(req.getFile(), inputStream -> {
|
||||
val readContext = new ReadContext();
|
||||
|
||||
EasyExcel.read(inputStream, AssignmentImportReqBO.ImportExcelModel.class, new ReadListener<AssignmentImportReqBO.ImportExcelModel>() {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void invoke(final AssignmentImportReqBO.ImportExcelModel record,
|
||||
final AnalysisContext context) {
|
||||
|
||||
val bizKey = record.getBizKey();
|
||||
if (StringUtils.isNotBlank(bizKey)) {
|
||||
val rec = new ReadContext.Record(bizKey);
|
||||
|
||||
val loanSource = record.getLoanSource();
|
||||
if (StringUtils.isNotBlank(loanSource)) {
|
||||
val loanSourceDO = dictDal.findByValue(loanSourceCategory, 0L, loanSource);
|
||||
if (loanSourceDO == null) {
|
||||
readContext.addError("案件来源[" + loanSource + "]不存在");
|
||||
}
|
||||
else {
|
||||
if (loanSourceDO != null) {
|
||||
val loan = loanDal.findBySourceIdAndBizKey(loanSourceDO.getId(), bizKey);
|
||||
if (loan != null) {
|
||||
rec.setLoan(loan);
|
||||
}
|
||||
else {
|
||||
readContext.addError("案件[" + bizKey + "]不存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
readContext.addError("案件来源不能为空");
|
||||
}
|
||||
|
||||
val mediatorKey = record.getMediator();
|
||||
if (StringUtils.isNotBlank(mediatorKey)) {
|
||||
val mediator = findMediator(mediatorKey);
|
||||
if (mediator != null) {
|
||||
rec.setMediator(mediator);
|
||||
readContext.addRecord(rec);
|
||||
}
|
||||
else {
|
||||
readContext.addError("调解员[" + mediatorKey + "]不存在");
|
||||
}
|
||||
}
|
||||
else {
|
||||
readContext.addError("调解员不能为空");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void doAfterAllAnalysed(final AnalysisContext context) {
|
||||
if (readContext.hasError()) {
|
||||
resp.setErrors(readContext.getErrors());
|
||||
return;
|
||||
}
|
||||
|
||||
val records = readContext.getRecords();
|
||||
val rows = new int[] { 0 };
|
||||
ListUtils.eachBatch(records.values(), 20, recs -> {
|
||||
dal.checkOut(recs.stream().map(rec -> rec.getLoan().getId()).collect(Collectors.toList()));
|
||||
rows[0] +=
|
||||
dal.assign(recs.stream().map(
|
||||
rec -> new AssignReqDO(rec.getLoan().getId(),
|
||||
rec.getMediator().getId()))
|
||||
.collect(Collectors.toSet()));
|
||||
});
|
||||
resp.setTotal(rows[0]);
|
||||
}
|
||||
}).customObject(readContext).sheet(0).doRead();
|
||||
});
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
MemberDO findMediator(final String mediator) {
|
||||
val rec = memberDal.findByAccount(mediator);
|
||||
return rec != null ? rec : memberDal.findByName(mediator);
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.pudonghot.yo.operation.service.assignment.impl.reader;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import lombok.ToString;
|
||||
import java.util.HashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.io.Serializable;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import com.pudonghot.yo.operation.dal.loan.model.LoanDO;
|
||||
import com.pudonghot.tigon.cms.dal.member.model.MemberDO;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Sep 27, 2024 20:51:56
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class ReadContext implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final List<String> errors = new ArrayList<>();
|
||||
private Integer total;
|
||||
private Map<Integer, String> appExtHeaders;
|
||||
private final Map<String, Record> records = new HashMap<>();
|
||||
|
||||
public boolean hasError() {
|
||||
return !errors.isEmpty();
|
||||
}
|
||||
|
||||
public void addError(final String error) {
|
||||
errors.add(error);
|
||||
}
|
||||
|
||||
public void addRecord(final Record record) {
|
||||
records.putIfAbsent(record.getBizKey(), record);
|
||||
}
|
||||
|
||||
public Record getRecord(final String bizKey) {
|
||||
return records.get(bizKey);
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@RequiredArgsConstructor
|
||||
@EqualsAndHashCode(of = "bizKey")
|
||||
public static class Record implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final String bizKey;
|
||||
private LoanDO loan;
|
||||
private MemberDO mediator;
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.pudonghot.yo.operation.service.assignment.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import com.pudonghot.tigon.service.model.ServModel;
|
||||
|
||||
/**
|
||||
* 催收案件分单记录表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:49:03
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class AssignmentBO extends ServModel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 案件ID
|
||||
*/
|
||||
private Long loanId;
|
||||
|
||||
/**
|
||||
* 催收员分组ID
|
||||
*/
|
||||
private Long groupId;
|
||||
|
||||
/**
|
||||
* 催收员ID
|
||||
*/
|
||||
private Long agentId;
|
||||
|
||||
/**
|
||||
* 协助催收员ID
|
||||
*/
|
||||
private Long assistantAgentId;
|
||||
|
||||
/**
|
||||
* 催收状态:在催,出催
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 案件分配日期
|
||||
*/
|
||||
private Date assignTime;
|
||||
|
||||
/**
|
||||
* 预计出催日期
|
||||
*/
|
||||
private Date expectExpireDate;
|
||||
|
||||
/**
|
||||
* 案件实际到期日期
|
||||
*/
|
||||
private Date actualExpireDate;
|
||||
|
||||
/**
|
||||
* 分案方式
|
||||
*/
|
||||
private String assignType;
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.pudonghot.yo.operation.service.assignment.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import com.pudonghot.tigon.service.request.BaseServReq;
|
||||
|
||||
/**
|
||||
* 催收案件分单记录表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:49:03
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class AssignmentCreateReqBO extends BaseServReq {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 案件ID
|
||||
*/
|
||||
private Long loanId;
|
||||
|
||||
/**
|
||||
* 催收员分组ID
|
||||
*/
|
||||
private Long groupId;
|
||||
|
||||
/**
|
||||
* 催收员ID
|
||||
*/
|
||||
private Long agentId;
|
||||
|
||||
/**
|
||||
* 协助催收员ID
|
||||
*/
|
||||
private Long assistantAgentId;
|
||||
|
||||
/**
|
||||
* 催收状态:在催,出催
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 案件分配日期
|
||||
*/
|
||||
private Date assignTime;
|
||||
|
||||
/**
|
||||
* 预计出催日期
|
||||
*/
|
||||
private Date expectExpireDate;
|
||||
|
||||
/**
|
||||
* 案件实际到期日期
|
||||
*/
|
||||
private Date actualExpireDate;
|
||||
|
||||
/**
|
||||
* 分案方式
|
||||
*/
|
||||
private String assignType;
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.pudonghot.yo.operation.service.assignment.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.pudonghot.tigon.kit.bean.annotation.ShallowField;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 16:12:37
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class AssignmentImportReqBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ShallowField
|
||||
private MultipartFile file;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public static class ImportExcelModel implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("案件来源")
|
||||
private String loanSource;
|
||||
|
||||
@ExcelProperty("合同号")
|
||||
private String bizKey;
|
||||
|
||||
@ExcelProperty("分案调解员")
|
||||
private String mediator;
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.pudonghot.yo.operation.service.assignment.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import com.pudonghot.tigon.service.request.UpdateServReq;
|
||||
|
||||
/**
|
||||
* 催收案件分单记录表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:49:03
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class AssignmentUpdateReqBO extends UpdateServReq<Long> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 案件ID
|
||||
*/
|
||||
private Long loanId;
|
||||
|
||||
/**
|
||||
* 催收员分组ID
|
||||
*/
|
||||
private Long groupId;
|
||||
|
||||
/**
|
||||
* 催收员ID
|
||||
*/
|
||||
private Long agentId;
|
||||
|
||||
/**
|
||||
* 协助催收员ID
|
||||
*/
|
||||
private Long assistantAgentId;
|
||||
|
||||
/**
|
||||
* 催收状态:在催,出催
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 案件分配日期
|
||||
*/
|
||||
private Date assignTime;
|
||||
|
||||
/**
|
||||
* 预计出催日期
|
||||
*/
|
||||
private Date expectExpireDate;
|
||||
|
||||
/**
|
||||
* 案件实际到期日期
|
||||
*/
|
||||
private Date actualExpireDate;
|
||||
|
||||
/**
|
||||
* 分案方式
|
||||
*/
|
||||
private String assignType;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.pudonghot.yo.operation.service.assignment.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 16:12:31
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class AssignmentImportRespBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer total = 0;
|
||||
private List<String> errors = new ArrayList<>();
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.pudonghot.yo.operation.service.home.impl;
|
||||
|
||||
import com.pudonghot.yo.operation.service.loan.DeptService;
|
||||
import lombok.val;
|
||||
import java.util.List;
|
||||
import com.pudonghot.yo.dal.agent.AgentDal;
|
||||
@ -34,7 +35,7 @@ public class HomeServiceImpl implements HomeService {
|
||||
@Autowired
|
||||
private SmsTemplateDal smsTemplateDal;
|
||||
@Autowired
|
||||
private DeptDal deptDal;
|
||||
private DeptService deptService;
|
||||
|
||||
@Value("${yo.webrtc.endpoint}")
|
||||
private String webRtcEndpoint;
|
||||
@ -74,7 +75,7 @@ public class HomeServiceImpl implements HomeService {
|
||||
*/
|
||||
@Override
|
||||
public List<DeptListRespBO> deptList() {
|
||||
return beanService.convert(deptDal.listTop(), DeptListRespBO.class);
|
||||
return beanService.convert(deptService.list(), DeptListRespBO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -85,11 +86,20 @@ public class HomeServiceImpl implements HomeService {
|
||||
val tenantId = authHook.getTenantId();
|
||||
val tenant = tenantDal.find(tenantId);
|
||||
val sipProfile = tenantDal2.findByCode(tenant.getCode());
|
||||
val realm = sipProfile.getRealm();
|
||||
|
||||
val agent = agentDal.findByDomainAndAccount(realm, account);
|
||||
val resp = beanService.convert(agent, WebRtcAgentRespBO.class);
|
||||
resp.setRealm(realm);
|
||||
if (sipProfile != null) {
|
||||
val realm = sipProfile.getRealm();
|
||||
|
||||
val agent = agentDal.findByDomainAndAccount(realm, account);
|
||||
if (agent != null) {
|
||||
val resp = beanService.convert(agent, WebRtcAgentRespBO.class);
|
||||
resp.setRealm(realm);
|
||||
resp.setEndpoint(webRtcEndpoint);
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
|
||||
val resp = new WebRtcAgentRespBO();
|
||||
resp.setEndpoint(webRtcEndpoint);
|
||||
|
||||
return resp;
|
||||
|
@ -0,0 +1,30 @@
|
||||
package com.pudonghot.yo.operation.service.interaction;
|
||||
|
||||
import com.pudonghot.tigon.service.TigonService;
|
||||
import com.pudonghot.yo.operation.service.interaction.model.InteractionBO;
|
||||
import com.pudonghot.yo.operation.service.interaction.request.InteractionCreateReqBO;
|
||||
import com.pudonghot.yo.operation.service.interaction.request.InteractionUpdateReqBO;
|
||||
import com.pudonghot.yo.operation.service.interaction.response.InteractionAgentBO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 催收记录表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 11:16:16
|
||||
*/
|
||||
public interface InteractionService
|
||||
extends TigonService<Long,
|
||||
InteractionBO,
|
||||
InteractionCreateReqBO,
|
||||
InteractionUpdateReqBO> {
|
||||
|
||||
/**
|
||||
* loan interaction agents
|
||||
*
|
||||
* @param loanId loan id
|
||||
* @return agents
|
||||
*/
|
||||
List<InteractionAgentBO> agents(Long loanId);
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package com.pudonghot.yo.operation.service.interaction.impl;
|
||||
|
||||
import lombok.val;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.springframework.util.Assert;
|
||||
import com.pudonghot.tigon.dal.hook.AuthHook;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.pudonghot.yo.operation.dal.loan.LoanDal;
|
||||
import com.pudonghot.tigon.service.impl.TigonServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.pudonghot.yo.operation.dal.interaction.InteractionDal;
|
||||
import com.pudonghot.yo.operation.dal.interaction.model.InteractionDO;
|
||||
import com.pudonghot.yo.operation.service.interaction.InteractionService;
|
||||
import com.pudonghot.yo.operation.service.interaction.model.InteractionBO;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.HandelCategoryEnum;
|
||||
import com.pudonghot.yo.operation.service.interaction.response.InteractionAgentBO;
|
||||
import com.pudonghot.yo.operation.service.interaction.request.InteractionCreateReqBO;
|
||||
import com.pudonghot.yo.operation.service.interaction.request.InteractionUpdateReqBO;
|
||||
|
||||
/**
|
||||
* 催收记录表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 11:16:16
|
||||
*/
|
||||
@Service
|
||||
public class InteractionServiceImpl
|
||||
extends TigonServiceImpl<Long,
|
||||
InteractionBO,
|
||||
InteractionCreateReqBO,
|
||||
InteractionUpdateReqBO,
|
||||
InteractionDO,
|
||||
InteractionDal>
|
||||
implements InteractionService {
|
||||
|
||||
@Autowired
|
||||
private LoanDal loanDal;
|
||||
@Autowired
|
||||
private AuthHook<Long> authHook;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<InteractionAgentBO> agents(final Long loanId) {
|
||||
return beanService.convert(dal.agents(loanId), InteractionAgentBO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void validateCreate(final InteractionCreateReqBO req) {
|
||||
super.validateCreate(req);
|
||||
val loanId = req.getLoanId();
|
||||
val loan = loanDal.find(loanId);
|
||||
|
||||
Assert.state(loan != null, () -> "No loan [" + loanId + "] found");
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void beforeCreate(final InteractionCreateReqBO req, final InteractionDO model) {
|
||||
super.beforeCreate(req, model);
|
||||
model.setAgentId(authHook.getMemberId());
|
||||
model.setDueDate(new Date());
|
||||
model.setHandleCategory(HandelCategoryEnum.MANUAL);
|
||||
}
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package com.pudonghot.yo.operation.service.interaction.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.pudonghot.tigon.service.model.ServModel;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.ConclusionEnum;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.InteractionTypeEnum;
|
||||
|
||||
/**
|
||||
* 催收记录表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 11:16:16
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class InteractionBO extends ServModel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 催收案件ID
|
||||
*/
|
||||
private Long loanId;
|
||||
|
||||
/**
|
||||
* 催收员ID
|
||||
*/
|
||||
private Long agentId;
|
||||
|
||||
/**
|
||||
* 催收方式
|
||||
*/
|
||||
private InteractionTypeEnum type;
|
||||
|
||||
/**
|
||||
* 结论
|
||||
*/
|
||||
private ConclusionEnum conclusion;
|
||||
|
||||
/**
|
||||
* 催收日期
|
||||
*/
|
||||
private Date dueDate;
|
||||
|
||||
/**
|
||||
* 下次跟进时间
|
||||
*/
|
||||
private Date recheckDate;
|
||||
|
||||
/**
|
||||
* 操作类别:内部人工;内部自动
|
||||
*/
|
||||
private String handleCategory;
|
||||
|
||||
/**
|
||||
* 是否有效联络: 有效;无效
|
||||
*/
|
||||
private String isCallValid;
|
||||
|
||||
/**
|
||||
* 承诺还款日期
|
||||
*/
|
||||
private Date promisedPaymentDate;
|
||||
|
||||
/**
|
||||
* 逾期原因
|
||||
*/
|
||||
private String overdueReason;
|
||||
|
||||
/**
|
||||
* 本人手机号状态
|
||||
*/
|
||||
private String phoneStatus;
|
||||
|
||||
/**
|
||||
* 短信表主键ID
|
||||
*/
|
||||
private Long smsId;
|
||||
|
||||
/**
|
||||
* 催收操作结果
|
||||
*/
|
||||
private String result;
|
||||
|
||||
/**
|
||||
* 承诺还款金额
|
||||
*/
|
||||
private BigDecimal promisedPaymentAmount;
|
||||
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 客户手机
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* contact表主键,联系人
|
||||
*/
|
||||
private Long contactId;
|
||||
|
||||
private String relation;
|
||||
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package com.pudonghot.yo.operation.service.interaction.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.pudonghot.tigon.service.request.BaseServReq;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.ConclusionEnum;
|
||||
import com.pudonghot.yo.operation.enumeration.interaction.InteractionTypeEnum;
|
||||
|
||||
/**
|
||||
* 催收记录表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 11:16:16
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class InteractionCreateReqBO extends BaseServReq {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 催收案件ID
|
||||
*/
|
||||
private Long loanId;
|
||||
|
||||
/**
|
||||
* 催收员ID
|
||||
*/
|
||||
private Long agentId;
|
||||
|
||||
/**
|
||||
* 催收方式
|
||||
*/
|
||||
private InteractionTypeEnum type;
|
||||
|
||||
/**
|
||||
* 结论
|
||||
*/
|
||||
private ConclusionEnum conclusion;
|
||||
|
||||
/**
|
||||
* 催收日期
|
||||
*/
|
||||
private Date dueDate;
|
||||
|
||||
/**
|
||||
* 下次跟进时间
|
||||
*/
|
||||
private Date recheckDate;
|
||||
|
||||
/**
|
||||
* 操作类别:内部人工;内部自动
|
||||
*/
|
||||
private String handleCategory;
|
||||
|
||||
/**
|
||||
* 是否有效联络: 有效;无效
|
||||
*/
|
||||
private String isCallValid;
|
||||
|
||||
/**
|
||||
* 承诺还款日期
|
||||
*/
|
||||
private Date promisedPaymentDate;
|
||||
|
||||
/**
|
||||
* 逾期原因
|
||||
*/
|
||||
private String overdueReason;
|
||||
|
||||
/**
|
||||
* 本人手机号状态
|
||||
*/
|
||||
private String phoneStatus;
|
||||
|
||||
/**
|
||||
* 短信表主键ID
|
||||
*/
|
||||
private Long smsId;
|
||||
|
||||
/**
|
||||
* 催收操作结果
|
||||
*/
|
||||
private String result;
|
||||
|
||||
/**
|
||||
* 承诺还款金额
|
||||
*/
|
||||
private BigDecimal promisedPaymentAmount;
|
||||
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 客户手机
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* contact表主键,联系人
|
||||
*/
|
||||
private Long contactId;
|
||||
|
||||
/**
|
||||
* 关系
|
||||
*/
|
||||
private String relation;
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package com.pudonghot.yo.operation.service.interaction.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.pudonghot.tigon.service.request.UpdateServReq;
|
||||
|
||||
/**
|
||||
* 催收记录表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 11:16:16
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class InteractionUpdateReqBO extends UpdateServReq<Long> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 催收案件ID
|
||||
*/
|
||||
private Long loanId;
|
||||
|
||||
/**
|
||||
* 催收方式
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 结论
|
||||
*/
|
||||
private String conclusion;
|
||||
|
||||
/**
|
||||
* 催收日期
|
||||
*/
|
||||
private Date dueDate;
|
||||
|
||||
/**
|
||||
* 下次跟进时间
|
||||
*/
|
||||
private Date recheckDate;
|
||||
|
||||
/**
|
||||
* 操作类别:内部人工;内部自动
|
||||
*/
|
||||
private String handleCategory;
|
||||
|
||||
/**
|
||||
* 是否有效联络: 有效;无效
|
||||
*/
|
||||
private String isCallValid;
|
||||
|
||||
/**
|
||||
* 承诺还款日期
|
||||
*/
|
||||
private Date promisedPaymentDate;
|
||||
|
||||
/**
|
||||
* 逾期原因
|
||||
*/
|
||||
private String overdueReason;
|
||||
|
||||
/**
|
||||
* 本人手机号状态
|
||||
*/
|
||||
private String phoneStatus;
|
||||
|
||||
/**
|
||||
* 短信表主键ID
|
||||
*/
|
||||
private Long smsId;
|
||||
|
||||
/**
|
||||
* 催收操作结果
|
||||
*/
|
||||
private String result;
|
||||
|
||||
/**
|
||||
* 承诺还款金额
|
||||
*/
|
||||
private BigDecimal promisedPaymentAmount;
|
||||
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 客户手机
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* contact表主键,联系人
|
||||
*/
|
||||
private Long contactId;
|
||||
|
||||
private String relation;
|
||||
|
||||
/**
|
||||
* 催收员ID
|
||||
*/
|
||||
private Long agentId;
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.pudonghot.yo.operation.service.interaction.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 11:26:08
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class InteractionAgentBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
}
|
@ -1,9 +1,8 @@
|
||||
package com.pudonghot.yo.operation.service.loanimport;
|
||||
package com.pudonghot.yo.operation.service.loan;
|
||||
|
||||
import com.pudonghot.yo.operation.service.loanimport.model.DeptBO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
import com.pudonghot.yo.operation.service.loan.model.DeptBO;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
@ -26,6 +25,13 @@ public interface DeptService {
|
||||
*/
|
||||
DeptBO find(String name);
|
||||
|
||||
/**
|
||||
* list depts
|
||||
*
|
||||
* @return depts
|
||||
*/
|
||||
List<DeptBO> list();
|
||||
|
||||
/**
|
||||
* depts
|
||||
*
|
@ -0,0 +1,47 @@
|
||||
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.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.response.LoanDetailRespBO;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanBatchUpdateFieldReqBO;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:56:36
|
||||
*/
|
||||
public interface LoanService
|
||||
extends TigonService<Long,
|
||||
LoanBO,
|
||||
LoanCreateReqBO,
|
||||
LoanUpdateReqBO> {
|
||||
|
||||
/**
|
||||
* 批量更新跟进标识
|
||||
*
|
||||
* @param req req
|
||||
* @return rows
|
||||
*/
|
||||
Integer batchUpdateField(LoanBatchUpdateFieldReqBO req);
|
||||
|
||||
/**
|
||||
* query
|
||||
*
|
||||
* @param req req
|
||||
* @return resp
|
||||
*/
|
||||
LoanQueryRespBO query(LoanQueryReqBO req);
|
||||
|
||||
/**
|
||||
* loan detail
|
||||
*
|
||||
* @param loanId loan id
|
||||
* @return loan detail
|
||||
*/
|
||||
LoanDetailRespBO detail(Long loanId);
|
||||
}
|
@ -1,9 +1,8 @@
|
||||
package com.pudonghot.yo.operation.service.loanimport;
|
||||
package com.pudonghot.yo.operation.service.loan;
|
||||
|
||||
import com.pudonghot.yo.operation.service.loanimport.model.LoanSourceBO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
import com.pudonghot.yo.operation.service.loan.model.LoanSourceBO;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
@ -26,6 +25,13 @@ public interface LoanSourceService {
|
||||
*/
|
||||
LoanSourceBO find(String name);
|
||||
|
||||
/**
|
||||
* list loan sources
|
||||
*
|
||||
* @return loan sources
|
||||
*/
|
||||
List<LoanSourceBO> list();
|
||||
|
||||
/**
|
||||
* list loan source
|
||||
*
|
@ -0,0 +1,67 @@
|
||||
package com.pudonghot.yo.operation.service.loan.impl;
|
||||
|
||||
import lombok.val;
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.pudonghot.tigon.kit.bean.BeanService;
|
||||
import com.pudonghot.tigon.cms.dal.dict.DictDal;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import com.pudonghot.yo.operation.service.loan.DeptService;
|
||||
import com.pudonghot.yo.operation.service.loan.model.DeptBO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.pudonghot.tigon.cms.dal.dict.request.DictListOfCategoryReqDO;
|
||||
import com.pudonghot.tigon.cms.common.enumeration.dict.DictBasicCategoryEnum;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 09, 2024 15:58:37
|
||||
*/
|
||||
@Service("deptImportServiceImpl")
|
||||
public class DeptServiceImpl implements DeptService {
|
||||
|
||||
@Autowired
|
||||
private DictDal deptDal;
|
||||
@Autowired
|
||||
private BeanService beanService;
|
||||
|
||||
@Value("${yo.dept.default:创易广州分公司}")
|
||||
private String defaultDept;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public DeptBO findDefault() {
|
||||
return find(defaultDept);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public DeptBO find(final String name) {
|
||||
return beanService.convert(deptDal.findByValue(DictBasicCategoryEnum.DEPT.name(), 0L, name), DeptBO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<DeptBO> list() {
|
||||
val category = deptDal.findCategoryByCode(DictBasicCategoryEnum.DEPT.name());
|
||||
val req = new DictListOfCategoryReqDO();
|
||||
req.setCategoryId(category.getId());
|
||||
req.setParentId(0L);
|
||||
return beanService.convert(deptDal.listAllByCategoryId(req), DeptBO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<DeptBO> list(final Collection<String> names) {
|
||||
return list().stream().filter(it -> names.contains(it.getName())).collect(Collectors.toList());
|
||||
}
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
package com.pudonghot.yo.operation.service.loan.impl;
|
||||
|
||||
import lombok.val;
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
import java.util.Collections;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.pudonghot.tigon.cms.dal.dict.DictDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.LoanDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.BankCardDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.CustomerDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.model.LoanDO;
|
||||
import com.pudonghot.yo.operation.dal.loan.RepaymentDal;
|
||||
import com.pudonghot.tigon.service.impl.TigonServiceImpl;
|
||||
import com.pudonghot.yo.operation.service.loan.LoanService;
|
||||
import com.pudonghot.yo.operation.service.loan.model.LoanBO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.pudonghot.yo.operation.dal.application.ApplicationDal;
|
||||
import com.pudonghot.yo.operation.dal.loan.request.LoanQueryReqDO;
|
||||
import com.pudonghot.yo.operation.dal.application.ApplicationExtDal;
|
||||
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.response.LoanDetailRespBO;
|
||||
import com.pudonghot.yo.operation.service.loan.request.LoanBatchUpdateFieldReqBO;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:56:36
|
||||
*/
|
||||
@Service
|
||||
public class LoanServiceImpl
|
||||
extends TigonServiceImpl<Long,
|
||||
LoanBO,
|
||||
LoanCreateReqBO,
|
||||
LoanUpdateReqBO,
|
||||
LoanDO,
|
||||
LoanDal>
|
||||
implements LoanService {
|
||||
|
||||
@Autowired
|
||||
private DictDal loanSourceDal;
|
||||
@Autowired
|
||||
private ApplicationDal applicationDal;
|
||||
@Autowired
|
||||
private ApplicationExtDal applicationExtDal;
|
||||
@Autowired
|
||||
private CustomerDal customerDal;
|
||||
@Autowired
|
||||
private BankCardDal bankCardDal;
|
||||
@Autowired
|
||||
private RepaymentDal repaymentDal;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoanDetailRespBO detail(final Long loanId) {
|
||||
val loan = dal.find(loanId);
|
||||
Assert.state(loan != null, () -> "No loan [" + loanId + "] found");
|
||||
val resp = new LoanDetailRespBO();
|
||||
resp.setLoan(beanService.convert(loan, LoanDetailRespBO.LoanBO.class));
|
||||
|
||||
val loanSourceId = loan.getLoanSourceId();
|
||||
resp.setLoanSource(beanService.convert(loanSourceDal.find(loanSourceId), LoanDetailRespBO.LoanSourceBO.class));
|
||||
|
||||
val application = applicationDal.findByLoanId(loanId);
|
||||
Assert.state(application != null, () -> "No application of loan [" + loanId + "] found");
|
||||
val applicationBO = beanService.convert(application, LoanDetailRespBO.ApplicationBO.class);
|
||||
val appExt = applicationExtDal.findByLoanId(loanId);
|
||||
if (appExt != null) {
|
||||
val extFields = beanService.convert(
|
||||
Arrays.asList(
|
||||
appExt.getExtData1(),
|
||||
appExt.getExtData2(),
|
||||
appExt.getExtData3(),
|
||||
appExt.getExtData4(),
|
||||
appExt.getExtData5(),
|
||||
appExt.getExtData6(),
|
||||
appExt.getExtData7(),
|
||||
appExt.getExtData8(),
|
||||
appExt.getExtData9(),
|
||||
appExt.getExtData10()
|
||||
).stream().filter(Objects::nonNull).collect(Collectors.toList()),
|
||||
LoanDetailRespBO.ApplicationBO.ExtFieldBO.class
|
||||
);
|
||||
applicationBO.setExtFields(extFields);
|
||||
}
|
||||
else {
|
||||
applicationBO.setExtFields(Collections.emptyList());
|
||||
}
|
||||
|
||||
resp.setApplication(applicationBO);
|
||||
val customer = customerDal.findByLoanId(loanId);
|
||||
Assert.state(customer != null, () -> "No customer of loan [" + loanId + "] found");
|
||||
resp.setCustomer(beanService.convert(customer, LoanDetailRespBO.CustomerBO.class));
|
||||
|
||||
val bankCards = bankCardDal.listByLoanId(loanId);
|
||||
resp.setBankCards(beanService.convert(bankCards, LoanDetailRespBO.BankCardBO.class));
|
||||
|
||||
val repayments = repaymentDal.listByLoanId(loanId);
|
||||
resp.setRepayments(beanService.convert(repayments, LoanDetailRespBO.RepaymentBO.class));
|
||||
|
||||
return resp;
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.pudonghot.yo.operation.service.loan.impl;
|
||||
|
||||
import lombok.val;
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.pudonghot.tigon.kit.bean.BeanService;
|
||||
import com.pudonghot.tigon.cms.dal.dict.DictDal;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.pudonghot.yo.operation.service.loan.LoanSourceService;
|
||||
import com.pudonghot.tigon.cms.dal.dict.request.DictListOfCategoryReqDO;
|
||||
import com.pudonghot.yo.operation.service.loan.model.LoanSourceBO;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 09, 2024 12:11:33
|
||||
*/
|
||||
@Service("loanSourceImportServiceImpl")
|
||||
public class LoanSourceServiceImpl implements LoanSourceService {
|
||||
|
||||
@Autowired
|
||||
private DictDal dictDal;
|
||||
@Autowired
|
||||
private BeanService beanService;
|
||||
@Value("${yo.loan-source.category:LOAN_SOURCE}")
|
||||
private String categoryCode;
|
||||
@Value("${yo.loan-source.default:DEFAULT}")
|
||||
private String defaultCode;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoanSourceBO findDefault() {
|
||||
val loanSource = dictDal.findByCode(categoryCode, defaultCode);
|
||||
return beanService.convert(loanSource, LoanSourceBO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoanSourceBO find(final String name) {
|
||||
return beanService.convert(dictDal.findByValue(categoryCode, 0L, name), LoanSourceBO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<LoanSourceBO> list() {
|
||||
val category = dictDal.findCategoryByCode(categoryCode);
|
||||
val req = new DictListOfCategoryReqDO();
|
||||
req.setCategoryId(category.getId());
|
||||
return beanService.convert(dictDal.listAllByCategoryId(req), LoanSourceBO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<LoanSourceBO> list(final Collection<String> names) {
|
||||
return list().stream().filter(it -> names.contains(it.getName())).collect(Collectors.toList());
|
||||
}
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
package com.pudonghot.yo.operation.service.loanimport.model;
|
||||
package com.pudonghot.yo.operation.service.loan.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import com.fasterxml.jackson.annotation.JsonAlias;
|
||||
import com.pudonghot.tigon.service.model.BaseServModel;
|
||||
|
||||
/**
|
||||
@ -18,5 +19,6 @@ public class DeptBO extends BaseServModel {
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@JsonAlias("value")
|
||||
private String name;
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.pudonghot.yo.operation.service.loan.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import com.pudonghot.tigon.service.model.ServModel;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:56:36
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class LoanBO extends ServModel {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 导入时间
|
||||
*/
|
||||
private Date importTime;
|
||||
|
||||
/**
|
||||
* 导入批次ID
|
||||
*/
|
||||
private Long importBatchId;
|
||||
|
||||
/**
|
||||
* 案件来源ID
|
||||
*/
|
||||
private Long loanSourceId;
|
||||
|
||||
/**
|
||||
* 外部合同号
|
||||
*/
|
||||
private String contractNumber;
|
||||
|
||||
/**
|
||||
* 逾期天数
|
||||
*/
|
||||
private Integer overdueDays;
|
||||
|
||||
/**
|
||||
* 应还总金额,单位:分
|
||||
*/
|
||||
private Long overdueAmount;
|
||||
|
||||
/**
|
||||
* 应还本金,单位:分
|
||||
*/
|
||||
private Long principalAmount;
|
||||
|
||||
/**
|
||||
* 应还利息,单位:分
|
||||
*/
|
||||
private Long interestAmount;
|
||||
|
||||
/**
|
||||
* 应还服务费,单位:分
|
||||
*/
|
||||
private Long serviceAmount;
|
||||
|
||||
/**
|
||||
* 应还罚息,单位:分
|
||||
*/
|
||||
private Long penaltyAmount;
|
||||
|
||||
/**
|
||||
* 还款状态
|
||||
*/
|
||||
private String repaymentStatus;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* 调解函地址
|
||||
*/
|
||||
private String mediateFile;
|
||||
|
||||
/**
|
||||
* 调解结果
|
||||
*/
|
||||
private String mediateResult;
|
||||
|
||||
/**
|
||||
* 跟进标识
|
||||
*/
|
||||
private String followMark;
|
||||
|
||||
/**
|
||||
* 调解码
|
||||
*/
|
||||
private String tjContractNumber;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.pudonghot.yo.operation.service.loanimport.model;
|
||||
package com.pudonghot.yo.operation.service.loan.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@ -19,12 +19,11 @@ public class LoanSourceBO extends BaseServModel {
|
||||
/**
|
||||
* 渠道数据源代码
|
||||
*/
|
||||
@JsonAlias("loanSourceCode")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 渠道数据源名称
|
||||
*/
|
||||
@JsonAlias("loanSourceName")
|
||||
@JsonAlias({"value"})
|
||||
private String name;
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.pudonghot.yo.operation.service.loan.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.List;
|
||||
import com.pudonghot.tigon.service.request.BaseServReq;
|
||||
|
||||
/**
|
||||
* 信贷案件表,批量更新属性
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:56:36
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class LoanBatchUpdateFieldReqBO extends BaseServReq {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private List<Long> idList;
|
||||
|
||||
private String field;
|
||||
|
||||
private Object value;
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.pudonghot.yo.operation.service.loan.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import com.pudonghot.tigon.service.request.BaseServReq;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:56:36
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class LoanCreateReqBO extends BaseServReq {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 导入时间
|
||||
*/
|
||||
private Date importTime;
|
||||
|
||||
/**
|
||||
* 导入批次ID
|
||||
*/
|
||||
private Long importBatchId;
|
||||
|
||||
/**
|
||||
* 案件来源ID
|
||||
*/
|
||||
private Long loanSourceId;
|
||||
|
||||
/**
|
||||
* 外部合同号
|
||||
*/
|
||||
private String contractNumber;
|
||||
|
||||
/**
|
||||
* 逾期天数
|
||||
*/
|
||||
private Integer overdueDays;
|
||||
|
||||
/**
|
||||
* 应还总金额,单位:分
|
||||
*/
|
||||
private Long overdueAmount;
|
||||
|
||||
/**
|
||||
* 应还本金,单位:分
|
||||
*/
|
||||
private Long principalAmount;
|
||||
|
||||
/**
|
||||
* 应还利息,单位:分
|
||||
*/
|
||||
private Long interestAmount;
|
||||
|
||||
/**
|
||||
* 应还服务费,单位:分
|
||||
*/
|
||||
private Long serviceAmount;
|
||||
|
||||
/**
|
||||
* 应还罚息,单位:分
|
||||
*/
|
||||
private Long penaltyAmount;
|
||||
|
||||
/**
|
||||
* 还款状态
|
||||
*/
|
||||
private String repaymentStatus;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* 调解函地址
|
||||
*/
|
||||
private String mediateFile;
|
||||
|
||||
/**
|
||||
* 调解结果
|
||||
*/
|
||||
private String mediateResult;
|
||||
}
|
@ -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,27 @@
|
||||
package com.pudonghot.yo.operation.service.loan.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import com.pudonghot.tigon.service.request.BaseServReq;
|
||||
|
||||
/**
|
||||
* 案件来源表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:57:07
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class LoanSourceCreateReqBO extends BaseServReq {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 渠道数据源代码
|
||||
*/
|
||||
private String loanSourceCode;
|
||||
|
||||
/**
|
||||
* 渠道数据源名称
|
||||
*/
|
||||
private String loanSourceName;
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.pudonghot.yo.operation.service.loan.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import com.pudonghot.tigon.service.request.UpdateServReq;
|
||||
|
||||
/**
|
||||
* 案件来源表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:57:07
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class LoanSourceUpdateReqBO extends UpdateServReq<Long> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 渠道数据源代码
|
||||
*/
|
||||
private String loanSourceCode;
|
||||
|
||||
/**
|
||||
* 渠道数据源名称
|
||||
*/
|
||||
private String loanSourceName;
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.pudonghot.yo.operation.service.loan.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import com.pudonghot.tigon.service.request.UpdateServReq;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:56:36
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class LoanUpdateReqBO extends UpdateServReq<Long> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 导入时间
|
||||
*/
|
||||
private Date importTime;
|
||||
|
||||
/**
|
||||
* 导入批次ID
|
||||
*/
|
||||
private Long importBatchId;
|
||||
|
||||
/**
|
||||
* 案件来源ID
|
||||
*/
|
||||
private Long loanSourceId;
|
||||
|
||||
/**
|
||||
* 外部合同号
|
||||
*/
|
||||
private String contractNumber;
|
||||
|
||||
/**
|
||||
* 逾期天数
|
||||
*/
|
||||
private Integer overdueDays;
|
||||
|
||||
/**
|
||||
* 应还总金额,单位:分
|
||||
*/
|
||||
private Long overdueAmount;
|
||||
|
||||
/**
|
||||
* 应还本金,单位:分
|
||||
*/
|
||||
private Long principalAmount;
|
||||
|
||||
/**
|
||||
* 应还利息,单位:分
|
||||
*/
|
||||
private Long interestAmount;
|
||||
|
||||
/**
|
||||
* 应还服务费,单位:分
|
||||
*/
|
||||
private Long serviceAmount;
|
||||
|
||||
/**
|
||||
* 应还罚息,单位:分
|
||||
*/
|
||||
private Long penaltyAmount;
|
||||
|
||||
/**
|
||||
* 还款状态
|
||||
*/
|
||||
private String repaymentStatus;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* 调解函地址
|
||||
*/
|
||||
private String mediateFile;
|
||||
|
||||
/**
|
||||
* 调解结果
|
||||
*/
|
||||
private String mediateResult;
|
||||
}
|
@ -0,0 +1,628 @@
|
||||
package com.pudonghot.yo.operation.service.loan.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAlias;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import lombok.ToString;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import com.pudonghot.tigon.cms.common.enumeration.GenderEnum;
|
||||
import com.pudonghot.yo.operation.enumeration.repayment.RepaymentStatusEnum;
|
||||
|
||||
/**
|
||||
* 借款详情
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 10:07:37
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class LoanDetailRespBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private LoanSourceBO loanSource;
|
||||
private ApplicationBO application;
|
||||
private LoanBO loan;
|
||||
private CustomerBO customer;
|
||||
private List<BankCardBO> bankCards;
|
||||
private List<ContactBO> contacts;
|
||||
private List<RepaymentBO> repayments;
|
||||
|
||||
/**
|
||||
* 信贷案件表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 15, 2024 15:59:16
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public static class LoanBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 导入时间
|
||||
*/
|
||||
private Date importTime;
|
||||
|
||||
/**
|
||||
* 导入批次ID
|
||||
*/
|
||||
private Long importBatchId;
|
||||
|
||||
/**
|
||||
* 案件来源ID
|
||||
*/
|
||||
private Long loanSourceId;
|
||||
|
||||
/**
|
||||
* 外部合同号
|
||||
*/
|
||||
private String contractNumber;
|
||||
|
||||
/**
|
||||
* 逾期天数
|
||||
*/
|
||||
private Integer overdueDays;
|
||||
|
||||
/**
|
||||
* 应还总金额,单位:分
|
||||
*/
|
||||
private Long overdueAmount;
|
||||
|
||||
/**
|
||||
* 应还本金,单位:分
|
||||
*/
|
||||
private Long principalAmount;
|
||||
|
||||
/**
|
||||
* 应还利息,单位:分
|
||||
*/
|
||||
private Long interestAmount;
|
||||
|
||||
/**
|
||||
* 应还服务费,单位:分
|
||||
*/
|
||||
private Long serviceAmount;
|
||||
|
||||
/**
|
||||
* 应还罚息,单位:分
|
||||
*/
|
||||
private Long penaltyAmount;
|
||||
|
||||
/**
|
||||
* 还款状态
|
||||
*/
|
||||
private RepaymentStatusEnum repaymentStatus;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* 调解函地址
|
||||
*/
|
||||
private String mediateFile;
|
||||
|
||||
/**
|
||||
* 调解结果
|
||||
*/
|
||||
private String mediateResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 还款计划表
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 10:16:17
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public static class RepaymentBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 期数
|
||||
*/
|
||||
private int installment;
|
||||
|
||||
/**
|
||||
* 还款状态 UNPAID未还款 PARTIALLY_PAID 部分还款 FULLY_PAID全部还款
|
||||
*/
|
||||
private RepaymentStatusEnum status;
|
||||
|
||||
/**
|
||||
* 计划还款时间
|
||||
*/
|
||||
private Date expectRepayTime;
|
||||
|
||||
/**
|
||||
* 实际还款时间
|
||||
*/
|
||||
private Date actualRepayTime;
|
||||
|
||||
/**
|
||||
* 应还本金,单位:分
|
||||
*/
|
||||
private Long expectPrincipalAmount;
|
||||
|
||||
/**
|
||||
* 已还本金,单位:分
|
||||
*/
|
||||
private Long actualPrincipalAmount;
|
||||
|
||||
/**
|
||||
* 应还利息,单位:分
|
||||
*/
|
||||
private Long expectInterestAmount;
|
||||
|
||||
/**
|
||||
* 已还利息,单位:分
|
||||
*/
|
||||
private Long actualInterestAmount;
|
||||
|
||||
/**
|
||||
* 应还平台服务费,单位:分
|
||||
*/
|
||||
private Long expectServiceAmount;
|
||||
|
||||
/**
|
||||
* 已还平台服务费,单位:分
|
||||
*/
|
||||
private Long actualServiceAmount;
|
||||
|
||||
/**
|
||||
* 应还罚息,单位:分
|
||||
*/
|
||||
private Long expectPenaltyAmount;
|
||||
|
||||
/**
|
||||
* 已还罚息,单位:分
|
||||
*/
|
||||
private Long actualPenaltyAmount;
|
||||
|
||||
/**
|
||||
* 减免金额
|
||||
*/
|
||||
private Long reductionAmount;
|
||||
|
||||
/**
|
||||
* 减免原因
|
||||
*/
|
||||
private String reductionReason;
|
||||
|
||||
/**
|
||||
* 应还总金额,单位:分
|
||||
*/
|
||||
private Long expectTotalAmount;
|
||||
|
||||
/**
|
||||
* 已还总金额,单位:分
|
||||
*/
|
||||
private Long actualTotalAmount;
|
||||
|
||||
/**
|
||||
* 逾期金额,单位:分
|
||||
*/
|
||||
private Long overdueAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 10:15:50
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public static class LoanSourceBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 渠道数据源代码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 渠道数据源名称
|
||||
*/
|
||||
@JsonAlias("value")
|
||||
private String name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 01, 2024 14:20:47
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public static class CustomerBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idNo;
|
||||
|
||||
/**
|
||||
* 手机
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private GenderEnum gender;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
private Date birthday;
|
||||
|
||||
/**
|
||||
* 户籍地址
|
||||
*/
|
||||
private String censusRegisterAddress;
|
||||
|
||||
/**
|
||||
* 学历
|
||||
*/
|
||||
private String educational;
|
||||
|
||||
/**
|
||||
* 婚姻状态
|
||||
*/
|
||||
private String marriage;
|
||||
|
||||
/**
|
||||
* 居住省
|
||||
*/
|
||||
private String residenceProvince;
|
||||
|
||||
/**
|
||||
* 居住市
|
||||
*/
|
||||
private String residenceCity;
|
||||
|
||||
/**
|
||||
* 居住区
|
||||
*/
|
||||
private String residenceDistrict;
|
||||
|
||||
/**
|
||||
* 常住地址
|
||||
*/
|
||||
private String residenceAddress;
|
||||
|
||||
/**
|
||||
* 居住时长
|
||||
*/
|
||||
private String residenceTime;
|
||||
|
||||
/**
|
||||
* qq
|
||||
*/
|
||||
private String qq;
|
||||
|
||||
/**
|
||||
* 职业
|
||||
*/
|
||||
private String profession;
|
||||
|
||||
/**
|
||||
* 月收入
|
||||
*/
|
||||
private String salary;
|
||||
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
private String workCompany;
|
||||
|
||||
/**
|
||||
* 最近工作年限
|
||||
*/
|
||||
private String recentlyWorkDuration;
|
||||
|
||||
/**
|
||||
* 单位所在省
|
||||
*/
|
||||
private String companyProvince;
|
||||
|
||||
/**
|
||||
* 单位所在市
|
||||
*/
|
||||
private String companyCity;
|
||||
|
||||
/**
|
||||
* 单位所在区
|
||||
*/
|
||||
private String companyDistrict;
|
||||
|
||||
/**
|
||||
* 单位详细地址
|
||||
*/
|
||||
private String companyAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户联系人
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 10:12:50
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public static class ContactBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 手机
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 关系
|
||||
*/
|
||||
private String relationType;
|
||||
|
||||
/**
|
||||
* 联系频率
|
||||
*/
|
||||
private String frequency;
|
||||
|
||||
/**
|
||||
* 联系人来源
|
||||
*/
|
||||
private String source;
|
||||
}
|
||||
|
||||
/**
|
||||
* 银行卡
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 10:13:28
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public static class BankCardBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 开户名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 银行预留手机号
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 银行ID
|
||||
*/
|
||||
private Long bankId;
|
||||
|
||||
/**
|
||||
* 银行卡卡号
|
||||
*/
|
||||
private String bankCardNo;
|
||||
|
||||
/**
|
||||
* 银行卡开户行
|
||||
*/
|
||||
private String bankName;
|
||||
|
||||
/**
|
||||
* 绑定优先级
|
||||
*/
|
||||
private Boolean priority;
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请单
|
||||
*
|
||||
* @author Donghuang
|
||||
* @date Oct 23, 2024 10:26:32
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public static class ApplicationBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 总期数
|
||||
*/
|
||||
private Integer totalInstallments;
|
||||
|
||||
/**
|
||||
* 当前期数
|
||||
*/
|
||||
private Integer currentInstallment;
|
||||
|
||||
/**
|
||||
* 已还期数
|
||||
*/
|
||||
private Integer repaidInstallments;
|
||||
|
||||
/**
|
||||
* 逾期期数
|
||||
*/
|
||||
private Integer overdueInstallments;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
private Date applyDate;
|
||||
|
||||
/**
|
||||
* 批核时间
|
||||
*/
|
||||
private Date approveDate;
|
||||
|
||||
/**
|
||||
* 放款时间
|
||||
*/
|
||||
private Date loanDate;
|
||||
|
||||
/**
|
||||
* 当期账单日
|
||||
*/
|
||||
private Date dueDate;
|
||||
|
||||
/**
|
||||
* 利率
|
||||
*/
|
||||
private BigDecimal interestRate;
|
||||
|
||||
/**
|
||||
* 服务费率
|
||||
*/
|
||||
private BigDecimal serviceInterestRate;
|
||||
|
||||
/**
|
||||
* 罚息利率
|
||||
*/
|
||||
private BigDecimal penaltyInterestRate;
|
||||
|
||||
/**
|
||||
* 合同(申请)金额
|
||||
*/
|
||||
private Long applyAmount;
|
||||
|
||||
/**
|
||||
* 放款金额
|
||||
*/
|
||||
private Long loanAmount;
|
||||
|
||||
/**
|
||||
* 违约金,罚金
|
||||
*/
|
||||
private Long defaultFineAmount;
|
||||
|
||||
/**
|
||||
* 逾期金额
|
||||
*/
|
||||
private Long overdueAmount;
|
||||
|
||||
/**
|
||||
* 剩余本金
|
||||
*/
|
||||
private Long principalRemain;
|
||||
|
||||
/**
|
||||
* 提前清贷金额
|
||||
*/
|
||||
private Long prepaymentAmount;
|
||||
|
||||
/**
|
||||
* 募资方
|
||||
*/
|
||||
private String fundraiser;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 还款方式
|
||||
*/
|
||||
private String repaymentType;
|
||||
|
||||
/**
|
||||
* 贷款平台名称
|
||||
*/
|
||||
private String platformName;
|
||||
|
||||
/**
|
||||
* 募资方名称
|
||||
*/
|
||||
private String fundraiserName;
|
||||
|
||||
/**
|
||||
* 助贷机构名称
|
||||
*/
|
||||
private String loanAgencyName;
|
||||
|
||||
/**
|
||||
* 紧急联系人关系
|
||||
*/
|
||||
private String emergencyContactRelation;
|
||||
|
||||
/**
|
||||
* 紧急联系人备注名
|
||||
*/
|
||||
private String emergencyContactName;
|
||||
|
||||
/**
|
||||
* 紧急联系人号码
|
||||
*/
|
||||
private String emergencyContactMobile;
|
||||
|
||||
private List<ExtFieldBO> extFields;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public static class ExtFieldBO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String label;
|
||||
private String value;
|
||||
}
|
||||
}
|
||||
}
|
@ -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,59 @@
|
||||
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 deptId;
|
||||
private String deptName;
|
||||
|
||||
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;
|
||||
}
|
@ -3,7 +3,7 @@ package com.pudonghot.yo.operation.service.loanimport.annotation;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.pudonghot.tigon.kit.spring.ApplicationContextProvider;
|
||||
import com.pudonghot.yo.operation.service.loanimport.DeptService;
|
||||
import com.pudonghot.yo.operation.service.loan.DeptService;
|
||||
import jakarta.validation.Payload;
|
||||
import java.lang.annotation.Target;
|
||||
import jakarta.validation.Constraint;
|
||||
|
@ -18,7 +18,7 @@ import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.pudonghot.tigon.kit.spring.ApplicationContextProvider;
|
||||
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
||||
import com.pudonghot.yo.operation.service.loanimport.LoanSourceService;
|
||||
import com.pudonghot.yo.operation.service.loan.LoanSourceService;
|
||||
|
||||
/**
|
||||
* 案件来源
|
||||
|
@ -1,50 +0,0 @@
|
||||
package com.pudonghot.yo.operation.service.loanimport.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.pudonghot.tigon.kit.bean.BeanService;
|
||||
import com.pudonghot.yo.operation.dal.dept.DeptDal;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.pudonghot.yo.operation.service.loanimport.DeptService;
|
||||
import com.pudonghot.yo.operation.service.loanimport.model.DeptBO;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 09, 2024 15:58:37
|
||||
*/
|
||||
@Service("deptImportServiceImpl")
|
||||
public class DeptServiceImpl implements DeptService {
|
||||
|
||||
@Autowired
|
||||
private DeptDal deptDal;
|
||||
@Autowired
|
||||
private BeanService beanService;
|
||||
@Value("${yo.default-dept:创易广州分公司}")
|
||||
private String defaultDept;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public DeptBO findDefault() {
|
||||
return beanService.convert(deptDal.findByName(defaultDept), DeptBO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public DeptBO find(final String name) {
|
||||
return beanService.convert(deptDal.findByName(name), DeptBO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<DeptBO> list(Collection<String> names) {
|
||||
return beanService.convert(deptDal.listByNames(names), DeptBO.class);
|
||||
}
|
||||
}
|
@ -37,14 +37,14 @@ import com.pudonghot.yo.operation.dal.loanimport.BatchNumberDal;
|
||||
import com.pudonghot.tigon.cms.service.seq.request.SeqGenReqBO;
|
||||
import com.pudonghot.yo.operation.dal.application.ApplicationDal;
|
||||
import com.pudonghot.tigon.cms.service.seq.response.SeqGenRespBO;
|
||||
import com.pudonghot.yo.operation.service.loanimport.DeptService;
|
||||
import com.pudonghot.yo.operation.service.loanimport.model.DeptBO;
|
||||
import com.pudonghot.yo.operation.service.loan.DeptService;
|
||||
import com.pudonghot.yo.operation.service.loan.model.DeptBO;
|
||||
import com.pudonghot.yo.operation.dal.application.ApplicationExtDal;
|
||||
import com.pudonghot.yo.operation.dal.loanimport.model.BatchNumberDO;
|
||||
import com.pudonghot.yo.operation.dal.application.model.ApplicationDO;
|
||||
import com.pudonghot.yo.operation.service.loanimport.LoanImportService;
|
||||
import com.pudonghot.yo.operation.service.loanimport.LoanSourceService;
|
||||
import com.pudonghot.yo.operation.service.loanimport.model.LoanSourceBO;
|
||||
import com.pudonghot.yo.operation.service.loan.LoanSourceService;
|
||||
import com.pudonghot.yo.operation.service.loan.model.LoanSourceBO;
|
||||
import com.pudonghot.yo.operation.dal.application.model.ApplicationExtDO;
|
||||
import com.pudonghot.yo.operation.service.loanimport.impl.reader.BaseReader;
|
||||
import com.pudonghot.yo.operation.service.loanimport.request.LoanImportReqBO;
|
||||
|
@ -1,50 +0,0 @@
|
||||
package com.pudonghot.yo.operation.service.loanimport.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.pudonghot.tigon.kit.bean.BeanService;
|
||||
import com.pudonghot.yo.operation.dal.loan.LoanSourceDal;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.pudonghot.yo.operation.service.loanimport.LoanSourceService;
|
||||
import com.pudonghot.yo.operation.service.loanimport.model.LoanSourceBO;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
* @date Oct 09, 2024 12:11:33
|
||||
*/
|
||||
@Service("loanSourceImportServiceImpl")
|
||||
public class LoanSourceServiceImpl implements LoanSourceService {
|
||||
|
||||
@Autowired
|
||||
private LoanSourceDal loanSourceDal;
|
||||
@Autowired
|
||||
private BeanService beanService;
|
||||
@Value("${yo.default-loan-source:DEFAULT}")
|
||||
private String defaultLoanSourceCode;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoanSourceBO findDefault() {
|
||||
return beanService.convert(loanSourceDal.findByCode(defaultLoanSourceCode), LoanSourceBO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public LoanSourceBO find(final String name) {
|
||||
return beanService.convert(loanSourceDal.findByName(name), LoanSourceBO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public List<LoanSourceBO> list(final Collection<String> names) {
|
||||
return beanService.convert(loanSourceDal.listByNames(names), LoanSourceBO.class);
|
||||
}
|
||||
}
|
@ -16,9 +16,8 @@ import jakarta.validation.constraints.NotBlank;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import jakarta.validation.constraints.PositiveOrZero;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import com.pudonghot.yo.operation.annotation.MoneyAmount;
|
||||
import com.pudonghot.yo.operation.service.loanimport.annotation.IdCard;
|
||||
import com.pudonghot.yo.operation.service.loanimport.annotation.MoneyAmount;
|
||||
|
||||
/**
|
||||
* @author Donghuang
|
||||
@ -256,16 +255,16 @@ public class ApplicationImportBO extends BaseImportBO {
|
||||
/**
|
||||
* 出生日期
|
||||
*
|
||||
* @return birth day
|
||||
* @return birthday
|
||||
*/
|
||||
public String getBirthday() {
|
||||
public Date getBirthday() {
|
||||
if (StringUtils.isBlank(idNo)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
val idCard = IdCardUtils.parse(idNo);
|
||||
if (idCard != null) {
|
||||
return DateFormatUtils.format(idCard.birthdate(), "yyyy-MM-dd");
|
||||
return idCard.birthdate();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user