Merge remote-tracking branch 'origin/master'

master
river 4 years ago
commit 177bc9b2aa
  1. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgBusinessProcessStatusMapper.java
  2. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentEntryListRes.java
  3. 6
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java
  4. 17
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgApplyAmountInfoServiceImpl.java
  5. 17
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgGuaranteeLetterAssignUserServiceImpl.java
  6. 4
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/DgLoanNoticeServiceImpl.java
  7. 10
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgBusinessProcessStatusMapper.xml
  8. 1
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgGuaranteeLetterAssignUserMapper.xml
  9. 1
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgLoanNoticeMapper.xml
  10. 1
      dq-financial-guarantee/src/main/resources/mapper/guarantee/DgPaymentConfirmationConsiderMapper.xml
  11. 4
      dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java

@ -4,6 +4,9 @@ package com.daqing.financial.guarantee.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.daqing.framework.domain.guarantee.DgBusinessProcessStatus; import com.daqing.framework.domain.guarantee.DgBusinessProcessStatus;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* <p> * <p>
@ -16,4 +19,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface DgBusinessProcessStatusMapper extends BaseMapper<DgBusinessProcessStatus> { public interface DgBusinessProcessStatusMapper extends BaseMapper<DgBusinessProcessStatus> {
int selectBybusinessIdAndStatus(@Param("businessIds") List<Integer> businessIds, @Param("businessStatus") Integer businessStatus);
} }

@ -97,6 +97,7 @@ public class AlRepaymentEntryListRes implements Serializable {
/** /**
* 创建时间 * 创建时间
*/ */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@TableField(fill= FieldFill.INSERT) @TableField(fill= FieldFill.INSERT)
private Date createTime; private Date createTime;
@ -104,6 +105,7 @@ public class AlRepaymentEntryListRes implements Serializable {
* 修改时间 * 修改时间
*/ */
@TableField(fill= FieldFill.INSERT_UPDATE) @TableField(fill= FieldFill.INSERT_UPDATE)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date updateTime; private Date updateTime;
/** /**
* 担保额度 * 担保额度

@ -169,7 +169,11 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl<AlRepaymentEntryMap
//遍历list取出应还款日,计算逾期天数=当前时间-应还款日 //遍历list取出应还款日,计算逾期天数=当前时间-应还款日
for (AlRepaymentEntryRes res:list) { for (AlRepaymentEntryRes res:list) {
long times2 = res.getRepaymentDate().getTime();//应还款日 long times2 = res.getRepaymentDate().getTime();//应还款日
long times3 = res.getActualRepaymentDate().getTime();//实际还款日 long times3=0L;
if(res.getActualRepaymentDate()!=null){
times3 = res.getActualRepaymentDate().getTime();//实际还款日
}
AlRepaymentEntry entry = new AlRepaymentEntry(); AlRepaymentEntry entry = new AlRepaymentEntry();
entry.setId(res.getId()); entry.setId(res.getId());
AlInsuranceList alInsuranceList = new AlInsuranceList(); AlInsuranceList alInsuranceList = new AlInsuranceList();

@ -135,6 +135,23 @@ public class DgApplyAmountInfoServiceImpl extends ServiceImpl<DgApplyAmountInfoM
log.error("LogAspect 操作失败:" + e.getMessage()); log.error("LogAspect 操作失败:" + e.getMessage());
e.printStackTrace(); e.printStackTrace();
} }
//根据社会统一信用代码判断是否可以申请业务,同一客户如果有一笔业务在业务流程在进行中,则不能再申请
//首先根据统一社会信用代码查询备份企业业务关联表中的业务id
List<DgBusinessCompany> businessCompanyList = dgBusinessCompanyMapper.selectList(new QueryWrapper<DgBusinessCompany>()
.eq("social_unified_code", businessApplication.getSocialUnifiedCode()));
List<Integer> businessIds = new ArrayList<Integer>();
for (DgBusinessCompany businessCompany:businessCompanyList) {
businessIds.add(businessCompany.getBusinessId());
}
//根据业务id查询dg_business_process_status表中是否存在业务为进行中的记录
Integer businessStatus=StatusCode.YW_IN_PROGRESS;//进行中
int count2 = dgBusinessProcessStatusMapper.selectBybusinessIdAndStatus(businessIds,businessStatus);
//如果存在,则不能再申请业务
if(count2>0){
ExceptionCast.cast(GuaranteeCode.REPEAT_BUSINESS);
}
//申请贷款相关信息 //申请贷款相关信息
DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo(); DgApplyAmountInfo dgApplyAmountInfo = new DgApplyAmountInfo();
dgApplyAmountInfo.setCompanyId(businessApplication.getCompanyId()); dgApplyAmountInfo.setCompanyId(businessApplication.getCompanyId());

@ -424,12 +424,27 @@ public class DgGuaranteeLetterAssignUserServiceImpl extends ServiceImpl<DgGuaran
dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REVIEWED); dgGuaranteeLetterAssignUserB.setStatus(StatusCode.SP_REVIEWED);
baseMapper.updateById(dgGuaranteeLetterAssignUserB); baseMapper.updateById(dgGuaranteeLetterAssignUserB);
//更新财务部经理回款数据 //更新财务部经理财务回款数据
QueryWrapper<DgPaymentConfirmationConsider> paymentConfirmationConsiderQueryWrapper = new QueryWrapper<>(); QueryWrapper<DgPaymentConfirmationConsider> paymentConfirmationConsiderQueryWrapper = new QueryWrapper<>();
paymentConfirmationConsiderQueryWrapper.eq("business_id",businessId).eq("role_id",PromptSuccess.CWB_ID); paymentConfirmationConsiderQueryWrapper.eq("business_id",businessId).eq("role_id",PromptSuccess.CWB_ID);
DgPaymentConfirmationConsider paymentConfirmationConsider = paymentConfirmationConsiderMapper.selectOne(paymentConfirmationConsiderQueryWrapper); DgPaymentConfirmationConsider paymentConfirmationConsider = paymentConfirmationConsiderMapper.selectOne(paymentConfirmationConsiderQueryWrapper);
paymentConfirmationConsider.setStatus(StatusCode.SP_IN_REVIEW); paymentConfirmationConsider.setStatus(StatusCode.SP_IN_REVIEW);
paymentConfirmationConsider.setOperatingStatus(StatusCode.CZ_ON_HAND); paymentConfirmationConsider.setOperatingStatus(StatusCode.CZ_ON_HAND);
//法规部数据存在,更新法规部经理财务回款数据
QueryWrapper<DgPaymentConfirmationConsider> paymentConfirmationConsiderFG = new QueryWrapper<>();
paymentConfirmationConsiderFG.eq("business_id",businessId).eq("role_id",PromptSuccess.FG_JL_ID);
DgPaymentConfirmationConsider paymentConfirmationConsiderFg = paymentConfirmationConsiderMapper.selectOne(paymentConfirmationConsiderFG);
//数据存在,进行更新
if (ObjectUtil.isNotNull(paymentConfirmationConsiderFg)){
paymentConfirmationConsiderFg.setStatus(StatusCode.SP_IN_REVIEW);
paymentConfirmationConsiderFg.setOperatingStatus(StatusCode.CZ_ON_HAND);
//清空上次的审批意见及银行回单
paymentConfirmationConsiderFg.setAuditOpinion("");
paymentConfirmationConsiderFg.setImgFile("");
paymentConfirmationConsiderMapper.updateById(paymentConfirmationConsiderFg);
}
//清空上次的审批意见及银行回单 //清空上次的审批意见及银行回单
paymentConfirmationConsider.setAuditOpinion(""); paymentConfirmationConsider.setAuditOpinion("");
paymentConfirmationConsider.setImgFile(""); paymentConfirmationConsider.setImgFile("");

@ -161,7 +161,9 @@ public class DgLoanNoticeServiceImpl extends ServiceImpl<DgLoanNoticeMapper, DgL
alInsuranceList.setApplyTime(createTime); alInsuranceList.setApplyTime(createTime);
alInsuranceList.setPhone(phone); alInsuranceList.setPhone(phone);
alInsuranceList.setCustomerName(name); alInsuranceList.setCustomerName(name);
alInsuranceList.setGuaranteeAmount(loanMoney); //转换单位
BigDecimal quota = new BigDecimal("10000");
alInsuranceList.setGuaranteeAmount(loanMoney.multiply(quota));
alInsuranceList.setGuaranteeTime(loanTern); alInsuranceList.setGuaranteeTime(loanTern);
alInsuranceList.setAmountWide(amountWide); alInsuranceList.setAmountWide(amountWide);
alInsuranceList.setPaymentStatus(1); alInsuranceList.setPaymentStatus(1);

@ -9,4 +9,14 @@
<result column="business_status" property="businessStatus" /> <result column="business_status" property="businessStatus" />
</resultMap> </resultMap>
<select id="selectBybusinessIdAndStatus" resultType="int" parameterType="long">
SELECT count(0)
FROM dg_business_process_status
WHERE business_id IN
<foreach collection="businessIds" open="(" separator="," close=")" item="item">
#{item}
</foreach>
AND business_status=#{businessStatus}
</select>
</mapper> </mapper>

@ -58,6 +58,7 @@
AND lau.status = #{status} AND lau.status = #{status}
</if> </if>
</where> </where>
ORDER BY lau.create_time DESC
</select> </select>

@ -57,6 +57,7 @@
AND ln.status = #{status} AND ln.status = #{status}
</if> </if>
</where> </where>
ORDER BY ln.create_time DESC
</select> </select>
<select id="selectBatchData" resultMap="LoanNoticeListResponseMap"> <select id="selectBatchData" resultMap="LoanNoticeListResponseMap">

@ -60,6 +60,7 @@
AND pcc.status = #{status} AND pcc.status = #{status}
</if> </if>
</where> </where>
ORDER BY pcc.create_time DESC
</select> </select>

@ -32,7 +32,9 @@ public enum GuaranteeCode implements ResultCode {
EFFICIENCY_TIME_ERROR(false, 130001,"时间格式错误!"), EFFICIENCY_TIME_ERROR(false, 130001,"时间格式错误!"),
FROM_DESIGN_PROCESS_ERROR(false,140001,"当前节点数据不存在!"), FROM_DESIGN_PROCESS_ERROR(false,140001,"当前节点数据不存在!"),
FROM_DESIGN_NAME_NOT_NULL(false,140002,"字段名称不能为空!"); FROM_DESIGN_NAME_NOT_NULL(false,140002,"字段名称不能为空!"),
REPEAT_BUSINESS(false,140002,"企业已申请进行中的业务,不能再次申请!");
/** /**
* 操作是否成功 * 操作是否成功
*/ */

Loading…
Cancel
Save