diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerAppletDao.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerAppletDao.java index 86ff1f59..bd6adbf7 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerAppletDao.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerAppletDao.java @@ -35,5 +35,7 @@ public interface CustomerAppletDao extends BaseMapper { List getApplyMount(Integer companyId); + Integer businessUnderwayCount(Integer companyId); + ApplyDetailPO getApplyDetail(Integer id); } diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java index 692d609d..64054425 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java @@ -372,12 +372,19 @@ public class CustomerAppletServiceImpl extends ServiceImpl 0) { + map.put("underway", 1.00); + } // 查询申请记录信息 List applicationRecordPOList = this.getBaseMapper().getApplyMount(companyId); if (applicationRecordPOList.size() < 1) { diff --git a/dq-financial-crms/src/main/resources/mapper/crms/CustomerAppletDao.xml b/dq-financial-crms/src/main/resources/mapper/crms/CustomerAppletDao.xml index 3c7e37a2..a51a7126 100644 --- a/dq-financial-crms/src/main/resources/mapper/crms/CustomerAppletDao.xml +++ b/dq-financial-crms/src/main/resources/mapper/crms/CustomerAppletDao.xml @@ -59,6 +59,15 @@ AND b.business_status = 2 + + SELECT i.id AS id,i.business_code AS code,i.customer_name AS name,i.phone AS phone,i.business_type AS type, - i.guarantee_amount AS amount,i.department AS department,i.payment_status AS status + i.guarantee_amount AS amount,i.department AS department,i.payment_status AS status,COUNT(c.id) AS numberOfCollection FROM al_insurance_list AS i INNER JOIN al_repayment_entry AS r ON i.id = r.insurance_id - WHERE r.repayment_status = 3 + INNER JOIN al_collection AS c + ON i.id = c.insurance_id + WHERE r.is_overdue = 0 + + AND i.status = #{status} + + + AND (i.customer_name like CONCAT('%',#{codeOrName},'%') OR i.business_code like CONCAT('%',#{codeOrName},'%')) + GROUP BY i.id + + + INSERT INTO al_collection (insurance_id,collection_method,collection_time,collection_feedback,enclosure_file + ,overdue_amount,overdue_interest,other_expenses,collection_user,overdue_periods) + VALUES (#{collection.insuranceId},#{collection.collectionMethod},#{collection.collectionTime}, + #{collection.collectionFeedback},#{collection.enclosureFile}, + #{collection.overdueAmount},#{collection.overdueInterest},#{collection.otherExpenses}, + #{collection.collectionUser},#{collection.overduePeriods}) + + + + + + + + + + + diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml index cf87e53e..ea79bdfb 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/AlRepaymentEntryMapper.xml @@ -61,4 +61,19 @@ left join al_insurance_list il on re.insurance_id=il.id + + + + + + diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlCollection.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlCollection.java index 0c5b7e1c..b3692533 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlCollection.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/AlCollection.java @@ -3,9 +3,13 @@ package com.daqing.framework.domain.guarantee; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.ToString; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; /** @@ -18,6 +22,7 @@ import java.util.Date; */ @Data @TableName("al_collection") +@ToString public class AlCollection implements Serializable { private static final long serialVersionUID = 1L; @@ -31,25 +36,58 @@ public class AlCollection implements Serializable { /** * 保后主键id */ + @ApiModelProperty("保后id") private Integer insuranceId; + /** + * 逾期金额 + */ + @ApiModelProperty("逾期金额") + private BigDecimal overdueAmount; + + /** + * 逾期利息 + */ + @ApiModelProperty("逾期利息") + private BigDecimal overdueInterest; + + /** + * 逾期费用 + */ + @ApiModelProperty("逾期费用") + private BigDecimal otherExpenses; + + /** + * 逾期期数 + */ + private Integer overduePeriods; + /** * 催收方式:1->电话催收;2->上门/外访; */ + @ApiModelProperty("催收方式:1->电话催收;2->上门/外访") private Integer collectionMethod; + + @ApiModelProperty("催收人") + private Integer collectionUser; + /** * 催收时间 */ + @ApiModelProperty("催收时间") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date collectionTime; /** * 催收反馈 */ + @ApiModelProperty("催收反馈") private String collectionFeedback; /** * 附件 */ + @ApiModelProperty("附件") private String enclosureFile; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AlCollectionPO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AlCollectionPO.java index 1af7a40f..11a07bfb 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AlCollectionPO.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/po/AlCollectionPO.java @@ -4,6 +4,7 @@ import lombok.Data; import lombok.ToString; import java.io.Serializable; +import java.math.BigDecimal; /** * 催熟管理数据接收 @@ -43,13 +44,18 @@ public class AlCollectionPO implements Serializable { /** * 担保额度 */ - private Double amount; + private BigDecimal amount; /** * 所属部门 */ private String department; + /** + * 催收次数 + */ + private Integer numberOfCollection; + /** * 状态 */