diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgBusinessProcessStatusMapper.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgBusinessProcessStatusMapper.java index d3700398..1cdedeb6 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgBusinessProcessStatusMapper.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/mapper/DgBusinessProcessStatusMapper.java @@ -4,6 +4,9 @@ package com.daqing.financial.guarantee.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.daqing.framework.domain.guarantee.DgBusinessProcessStatus; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** *

@@ -16,4 +19,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface DgBusinessProcessStatusMapper extends BaseMapper { + int selectBybusinessIdAndStatus(@Param("businessIds") List businessIds, @Param("businessStatus") Integer businessStatus); } diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentEntryListRes.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentEntryListRes.java index 0f5a9dd4..550815b2 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentEntryListRes.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/AlRepaymentEntryListRes.java @@ -97,6 +97,7 @@ public class AlRepaymentEntryListRes implements Serializable { /** * 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @TableField(fill= FieldFill.INSERT) private Date createTime; @@ -104,6 +105,7 @@ public class AlRepaymentEntryListRes implements Serializable { * 修改时间 */ @TableField(fill= FieldFill.INSERT_UPDATE) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date updateTime; /** * 担保额度(元) diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java index aa692749..39d1c1c4 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/service/impl/AlRepaymentEntryServiceImpl.java @@ -169,7 +169,11 @@ public class AlRepaymentEntryServiceImpl extends ServiceImpl businessCompanyList = dgBusinessCompanyMapper.selectList(new QueryWrapper() + .eq("social_unified_code", businessApplication.getSocialUnifiedCode())); + List businessIds = new ArrayList(); + 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.setCompanyId(businessApplication.getCompanyId()); diff --git a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgBusinessProcessStatusMapper.xml b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgBusinessProcessStatusMapper.xml index 567a989d..8f71754e 100644 --- a/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgBusinessProcessStatusMapper.xml +++ b/dq-financial-guarantee/src/main/resources/mapper/guarantee/DgBusinessProcessStatusMapper.xml @@ -9,4 +9,14 @@ + + diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java index 7d04872e..8de8578f 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/GuaranteeCode.java @@ -32,7 +32,9 @@ public enum GuaranteeCode implements ResultCode { EFFICIENCY_TIME_ERROR(false, 130001,"时间格式错误!"), FROM_DESIGN_PROCESS_ERROR(false,140001,"当前节点数据不存在!"), - FROM_DESIGN_NAME_NOT_NULL(false,140002,"字段名称不能为空!"); + FROM_DESIGN_NAME_NOT_NULL(false,140002,"字段名称不能为空!"), + + REPEAT_BUSINESS(false,140002,"企业已申请进行中的业务,不能再次申请!"); /** * 操作是否成功 */