123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518 |
- <?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.ruoyi.system.mapper.LoanApplicationMapper">
-
- <resultMap type="LoanApplication" id="LoanApplicationResult">
- <result property="loanApplicationId" column="loan_application_id" />
- <result property="loanApplicationNumber" column="loan_application_number" />
- <result property="applicationType" column="application_type" />
- <result property="applicationAmount" column="application_amount" />
- <result property="actuallyAmount" column="actually_amount" />
- <result property="applicationBank" column="application_bank" />
- <result property="usagePeriod" column="usage_period" />
- <result property="purposeFunds" column="purpose_funds" />
- <result property="repaymentSource" column="repayment_source" />
- <result property="enterpriseId" column="enterprise_id" />
- <result property="enterpriseName" column="enterprise_name" />
- <result property="categoryType" column="category_type" />
- <result property="isMake" column="is_make" />
- <result property="isNew" column="is_new" />
- <result property="isSmall" column="is_small" />
- <result property="isDuty" column="is_duty" />
- <result property="companyIntroduction" column="company_introduction" />
- <result property="customerType" column="customer_type" />
- <result property="corporationFront" column="corporation_front" />
- <result property="corporationBack" column="corporation_back" />
- <result property="corporationName" column="corporation_name" />
- <result property="corporationIdCard" column="corporation_id_card" />
- <result property="corporationPhone" column="corporation_phone" />
- <result property="corporationAddress" column="corporation_address" />
- <result property="corporationExpirationDate" column="corporation_expiration_date" />
- <result property="familyPopulation" column="family_population" />
- <result property="corporationJob" column="corporation_job" />
- <result property="isLoan" column="is_loan" />
- <result property="receivablePay" column="receivable_pay" />
- <result property="businessSituation" column="business_situation" />
- <result property="businessEfficiency" column="business_efficiency" />
- <result property="corporationMaritalStatus" column="corporation_marital_status" />
- <result property="spouseFront" column="spouse_front" />
- <result property="spouseBack" column="spouse_back" />
- <result property="spouseName" column="spouse_name" />
- <result property="spouseIdCard" column="spouse_id_card" />
- <result property="spousePhone" column="spouse_phone" />
- <result property="guaranteeType" column="guarantee_type" />
- <result property="guaranteeFront" column="guarantee_front" />
- <result property="guaranteeBack" column="guarantee_back" />
- <result property="guaranteeName" column="guarantee_name" />
- <result property="guaranteeIdCard" column="guarantee_id_card" />
- <result property="guaranteePhone" column="guarantee_phone" />
- <result property="guaranteeMaritalStatus" column="guarantee_marital_status" />
- <result property="guaranteeSpouseFront" column="guarantee_spouse_front" />
- <result property="guaranteeSpouseBack" column="guarantee_spouse_back" />
- <result property="guaranteeSpouseName" column="guarantee_spouse_name" />
- <result property="guaranteeSpouseIdCard" column="guarantee_spouse_id_card" />
- <result property="guaranteeSpousePhone" column="guarantee_spouse_phone" />
- <result property="guaranteeShareholderName" column="guarantee_shareholder_name" />
- <result property="guaranteeShareholderIdCard" column="guarantee_shareholder_id_card" />
- <result property="userId" column="user_id" />
- <result property="idCard" column="id_card" />
- <result property="applicationTime" column="application_time" />
- <result property="fileTime" column="file_time" />
- <result property="reviewTime" column="review_time" />
- <result property="loanSchedule" column="loan_schedule" />
- <result property="auditSchedule" column="audit_schedule" />
- <result property="auditType" column="audit_type" />
- <result property="loanApplicationType" column="loan_application_type" />
- <result property="reviewSchedule" column="review_schedule" />
- <result property="rejectionReason" column="rejection_reason" />
- <result property="aUserId" column="a_user_id" />
- <result property="aUserName" column="a_user_name" />
- <result property="aAuthorize" column="a_authorize" />
- <result property="bUserId" column="b_user_id" />
- <result property="bUserName" column="b_user_name" />
- <result property="fUserId" column="f_user_id" />
- <result property="fUserName" column="f_user_name" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="remark" column="remark" />
- </resultMap>
- <sql id="selectLoanApplicationVo">
- select loan_application_id, loan_application_number, application_type,application_amount,actually_amount,enterprise_id,guarantee_shareholder_name,guarantee_shareholder_id_card, application_bank, usage_period, purpose_funds, repayment_source, enterprise_name, category_type, is_make, is_new, is_small, is_duty, company_introduction, customer_type, corporation_front, corporation_back, corporation_name, corporation_id_card, corporation_phone,corporation_address,corporation_expiration_date, family_population, corporation_job, is_loan, receivable_pay, business_situation, business_efficiency, corporation_marital_status, spouse_front, spouse_back, spouse_name, spouse_id_card, spouse_phone, guarantee_type, guarantee_front, guarantee_back, guarantee_name, guarantee_id_card, guarantee_phone, guarantee_marital_status, guarantee_spouse_front, guarantee_spouse_back, guarantee_spouse_name, guarantee_spouse_id_card, guarantee_spouse_phone, user_id, id_card, application_time, file_time,review_time, loan_schedule, audit_schedule, audit_type, loan_application_type,review_schedule,rejection_reason, a_user_id, a_user_name,a_authorize, b_user_id, b_user_name,f_user_id, f_user_name, create_by, create_time, update_by, update_time, remark from loan_application
- </sql>
- <select id="selectLoanApplicationList" parameterType="LoanApplication" resultMap="LoanApplicationResult">
- <include refid="selectLoanApplicationVo"/>
- <where>
- <if test="loanApplicationNumber != null and loanApplicationNumber != ''"> and loan_application_number = #{loanApplicationNumber}</if>
- <if test="applicationAmount != null "> and application_amount = #{applicationAmount}</if>
- <if test="actuallyAmount != null "> and actually_amount = #{actuallyAmount}</if>
- <if test="applicationType != null and applicationType != ''"> and application_type = #{applicationType}</if>
- <if test="applicationBank != null and applicationBank != ''"> and application_bank = #{applicationBank}</if>
- <if test="usagePeriod != null and usagePeriod != ''"> and usage_period = #{usagePeriod}</if>
- <if test="purposeFunds != null and purposeFunds != ''"> and purpose_funds = #{purposeFunds}</if>
- <if test="repaymentSource != null and repaymentSource != ''"> and repayment_source = #{repaymentSource}</if>
- <if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
- <if test="categoryType != null and categoryType != ''"> and category_type = #{categoryType}</if>
- <if test="isMake != null and isMake != ''"> and is_make = #{isMake}</if>
- <if test="isNew != null and isNew != ''"> and is_new = #{isNew}</if>
- <if test="isSmall != null and isSmall != ''"> and is_small = #{isSmall}</if>
- <if test="isDuty != null and isDuty != ''"> and is_duty = #{isDuty}</if>
- <if test="companyIntroduction != null and companyIntroduction != ''"> and company_introduction = #{companyIntroduction}</if>
- <if test="customerType != null and customerType != ''"> and customer_type = #{customerType}</if>
- <if test="corporationFront != null and corporationFront != ''"> and corporation_front = #{corporationFront}</if>
- <if test="corporationBack != null and corporationBack != ''"> and corporation_back = #{corporationBack}</if>
- <if test="corporationName != null and corporationName != ''"> and corporation_name like concat('%', #{corporationName}, '%')</if>
- <if test="corporationIdCard != null and corporationIdCard != ''"> and corporation_id_card = #{corporationIdCard}</if>
- <if test="corporationPhone != null and corporationPhone != ''"> and corporation_phone = #{corporationPhone}</if>
- <if test="familyPopulation != null and familyPopulation != ''"> and family_population = #{familyPopulation}</if>
- <if test="corporationJob != null and corporationJob != ''"> and corporation_job = #{corporationJob}</if>
- <if test="isLoan != null and isLoan != ''"> and is_loan = #{isLoan}</if>
- <if test="receivablePay != null and receivablePay != ''"> and receivable_pay = #{receivablePay}</if>
- <if test="businessSituation != null and businessSituation != ''"> and business_situation = #{businessSituation}</if>
- <if test="businessEfficiency != null and businessEfficiency != ''"> and business_efficiency = #{businessEfficiency}</if>
- <if test="corporationMaritalStatus != null and corporationMaritalStatus != ''"> and corporation_marital_status = #{corporationMaritalStatus}</if>
- <if test="spouseFront != null and spouseFront != ''"> and spouse_front = #{spouseFront}</if>
- <if test="spouseBack != null and spouseBack != ''"> and spouse_back = #{spouseBack}</if>
- <if test="spouseName != null and spouseName != ''"> and spouse_name like concat('%', #{spouseName}, '%')</if>
- <if test="spouseIdCard != null and spouseIdCard != ''"> and spouse_id_card = #{spouseIdCard}</if>
- <if test="spousePhone != null and spousePhone != ''"> and spouse_phone = #{spousePhone}</if>
- <if test="guaranteeType != null and guaranteeType != ''"> and FIND_IN_SET(guarantee_type,#{guaranteeType})</if>
- <if test="guaranteeFront != null and guaranteeFront != ''"> and guarantee_front = #{guaranteeFront}</if>
- <if test="guaranteeBack != null and guaranteeBack != ''"> and guarantee_back = #{guaranteeBack}</if>
- <if test="guaranteeName != null and guaranteeName != ''"> and guarantee_name like concat('%', #{guaranteeName}, '%')</if>
- <if test="guaranteeIdCard != null and guaranteeIdCard != ''"> and guarantee_id_card = #{guaranteeIdCard}</if>
- <if test="guaranteePhone != null and guaranteePhone != ''"> and guarantee_phone = #{guaranteePhone}</if>
- <if test="guaranteeMaritalStatus != null and guaranteeMaritalStatus != ''"> and guarantee_marital_status = #{guaranteeMaritalStatus}</if>
- <if test="guaranteeSpouseFront != null and guaranteeSpouseFront != ''"> and guarantee_spouse_front = #{guaranteeSpouseFront}</if>
- <if test="guaranteeSpouseBack != null and guaranteeSpouseBack != ''"> and guarantee_spouse_back = #{guaranteeSpouseBack}</if>
- <if test="guaranteeSpouseName != null and guaranteeSpouseName != ''"> and guarantee_spouse_name like concat('%', #{guaranteeSpouseName}, '%')</if>
- <if test="guaranteeSpouseIdCard != null and guaranteeSpouseIdCard != ''"> and guarantee_spouse_id_card = #{guaranteeSpouseIdCard}</if>
- <if test="guaranteeSpousePhone != null and guaranteeSpousePhone != ''"> and guarantee_spouse_phone = #{guaranteeSpousePhone}</if>
- <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
- <if test="applicationTime != null ">AND date_format(application_time,'%Y%m%d') >= date_format(#{applicationTime},'%Y%m%d')</if>
- <if test="fileTime != null "> and file_time = #{fileTime}</if>
- <if test="reviewTime != null "> and review_time = #{reviewTime}</if>
- <if test="loanSchedule != null and loanSchedule != ''"> and loan_schedule = #{loanSchedule}</if>
- <if test="aAuthorize != null and aAuthorize != ''"> and a_authorize = #{aAuthorize}</if>
- <if test="auditSchedule != null and auditSchedule != ''"> and audit_schedule = #{auditSchedule}</if>
- <if test="auditType != null and auditType != ''"> and audit_type = #{auditType}</if>
- <if test="loanApplicationType != null and loanApplicationType != ''"> and loan_application_type = #{loanApplicationType}</if>
- <if test="reviewSchedule != null and reviewSchedule != ''"> and review_schedule = #{reviewSchedule}</if>
- <if test="userId != null "> and (a_user_id = #{userId} or (b_user_id = #{userId} and audit_schedule = '3') or user_id = #{userId} or f_user_id = #{userId})</if>
- <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
- AND date_format(create_time,'%Y') = #{params.beginTime}
- </if>
- </where>
- order by create_time DESC
- </select>
- <select id="selectLoanApplicationListStatistics" parameterType="LoanApplication" resultMap="LoanApplicationResult">
- <include refid="selectLoanApplicationVo"/>
- <where>
- <if test="type != null and type == '1'.toString()"><!-- 开始时间检索 -->
- AND date_format(application_time,'%Y') = #{params.beginTime}
- </if>
- <if test="type != null and type == '2'.toString()"><!-- 开始时间检索 -->
- AND date_format(application_time,'%Y%m') = #{params.beginTime}
- </if>
- </where>
- </select>
-
- <select id="selectLoanApplicationByLoanApplicationId" parameterType="Long" resultMap="LoanApplicationResult">
- <include refid="selectLoanApplicationVo"/>
- where loan_application_id = #{loanApplicationId}
- </select>
- <!-- <select id="conferenceList" parameterType="LoanApplication" resultMap="LoanApplicationResult">
- SELECT
- l.loan_application_id, l.loan_application_number, l.application_type,l.application_amount,l.enterprise_id,l.guarantee_shareholder_name,l.guarantee_shareholder_id_card, l.application_bank, l.usage_period, l.purpose_funds, l.repayment_source, l.enterprise_name, l.category_type, l.is_make, l.is_new, l.is_small,
- l.is_duty, l.company_introduction, l.customer_type, l.corporation_front, l.corporation_back, l.corporation_name, l.corporation_id_card, l.corporation_phone,l.corporation_address,l.corporation_expiration_date, l.family_population, l.corporation_job, l.is_loan, l.receivable_pay, l.business_situation, l.business_efficiency,
- l.corporation_marital_status, l.spouse_front, l.spouse_back, l.spouse_name, l.spouse_id_card, l.spouse_phone, l.guarantee_type, l.guarantee_front, l.guarantee_back, l.guarantee_name, l.guarantee_id_card, l.guarantee_phone, l.guarantee_marital_status, l.guarantee_spouse_front, l.guarantee_spouse_back, l.guarantee_spouse_name,
- l.guarantee_spouse_id_card, l.guarantee_spouse_phone, l.user_id, l.id_card, l.application_time, l.file_time,l.review_time, l.loan_schedule, l.audit_schedule, l.audit_type, l.loan_application_type,l.review_schedule, l.a_user_id, l.a_user_name,l.a_authorize, l.b_user_id, l.b_user_name,l.f_user_id, l.f_user_name,
- l.create_by, l.create_time, l.update_by, l.update_time, l.remark
- from sys_user_conference s
- LEFT JOIN loan_application l on l.loan_application_id = s.loan_application_id
- where l.loan_application_id is not null
- <if test="userId != null "> and s.user_id = #{userId} = #{userId}</if>
- <if test="enterpriseName != null and enterpriseName != ''"> and l.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
- <if test="applicationAmount != null "> and l.application_amount = #{applicationAmount}</if>
- <if test="reviewTime != null "> and l.review_time = #{reviewTime}</if>
- GROUP BY l.loan_application_id
- ORDER BY review_time desc
- </select>-->
- <select id="conferenceList" parameterType="LoanApplication" resultMap="LoanApplicationResult">
- SELECT
- ANY_VALUE(l.loan_application_id) as loan_application_id,
- ANY_VALUE(l.loan_application_number) as loan_application_number,
- ANY_VALUE(l.application_type) as application_type,
- ANY_VALUE(l.application_amount) as application_amount,
- ANY_VALUE(l.enterprise_id) as enterprise_id,
- ANY_VALUE(l.guarantee_shareholder_name) as guarantee_shareholder_name,
- ANY_VALUE(l.guarantee_shareholder_id_card) as guarantee_shareholder_id_card,
- ANY_VALUE(l.application_bank) as application_bank,
- ANY_VALUE(l.usage_period) as usage_period,
- ANY_VALUE(l.purpose_funds) as purpose_funds,
- ANY_VALUE(l.repayment_source) as repayment_source,
- ANY_VALUE(l.enterprise_name) as enterprise_name,
- ANY_VALUE(l.category_type) as category_type,
- ANY_VALUE(l.is_make) as is_make,
- ANY_VALUE(l.is_new) as is_new,
- ANY_VALUE(l.is_small) as is_small,
- ANY_VALUE(l.is_duty) as is_duty,
- ANY_VALUE(l.company_introduction) as company_introduction,
- ANY_VALUE(l.customer_type) as customer_type,
- ANY_VALUE(l.corporation_front) as corporation_front,
- ANY_VALUE(l.corporation_back) as corporation_back,
- ANY_VALUE(l.corporation_name) as corporation_name,
- ANY_VALUE(l.corporation_id_card) as corporation_id_card,
- ANY_VALUE(l.corporation_phone) as corporation_phone,
- ANY_VALUE(l.corporation_address) as corporation_address,
- ANY_VALUE(l.corporation_expiration_date) as corporation_expiration_date,
- ANY_VALUE(l.family_population) as family_population,
- ANY_VALUE(l.corporation_job) as corporation_job,
- ANY_VALUE(l.is_loan) as is_loan,
- ANY_VALUE(l.receivable_pay) as receivable_pay,
- ANY_VALUE(l.business_situation) as business_situation,
- ANY_VALUE(l.business_efficiency) as business_efficiency,
- ANY_VALUE(l.corporation_marital_status) as corporation_marital_status,
- ANY_VALUE(l.spouse_front) as spouse_front,
- ANY_VALUE(l.spouse_back) as spouse_back,
- ANY_VALUE(l.spouse_name) as spouse_name,
- ANY_VALUE(l.spouse_id_card) as spouse_id_card,
- ANY_VALUE(l.spouse_phone) as spouse_phone,
- ANY_VALUE(l.guarantee_type) as guarantee_type,
- ANY_VALUE(l.guarantee_front) as guarantee_front,
- ANY_VALUE(l.guarantee_back) as guarantee_back,
- ANY_VALUE(l.guarantee_name) as guarantee_name,
- ANY_VALUE(l.guarantee_id_card) as guarantee_id_card,
- ANY_VALUE(l.guarantee_phone) as guarantee_phone,
- ANY_VALUE(l.guarantee_marital_status) as guarantee_marital_status,
- ANY_VALUE(l.guarantee_spouse_front) as guarantee_spouse_front,
- ANY_VALUE(l.guarantee_spouse_back) as guarantee_spouse_back,
- ANY_VALUE(l.guarantee_spouse_name) as guarantee_spouse_name,
- ANY_VALUE(l.guarantee_spouse_id_card) as guarantee_spouse_id_card,
- ANY_VALUE(l.guarantee_spouse_phone) as guarantee_spouse_phone,
- ANY_VALUE(l.user_id) as user_id,
- ANY_VALUE(l.id_card) as id_card,
- ANY_VALUE(l.application_time) as application_time,
- ANY_VALUE(l.file_time) as file_time,
- ANY_VALUE(l.review_time) as review_time,
- ANY_VALUE(l.loan_schedule) as loan_schedule,
- ANY_VALUE(l.audit_schedule) as audit_schedule,
- ANY_VALUE(l.audit_type) as audit_type,
- ANY_VALUE(l.loan_application_type) as loan_application_type,
- ANY_VALUE(l.review_schedule) as review_schedule,
- ANY_VALUE(l.a_user_id) as a_user_id,
- ANY_VALUE(l.a_user_name) as a_user_name,
- ANY_VALUE(l.a_authorize) as a_authorize,
- ANY_VALUE(l.b_user_id) as b_user_id,
- ANY_VALUE(l.b_user_name) as b_user_name,
- ANY_VALUE(l.f_user_id) as f_user_id,
- ANY_VALUE(l.f_user_name) as f_user_name,
- ANY_VALUE(l.create_by) as create_by,
- ANY_VALUE(l.create_time) as create_time,
- ANY_VALUE(l.update_by) as update_by,
- ANY_VALUE(l.update_time) as update_time,
- ANY_VALUE(l.remark) as remark
- from sys_user_conference s
- LEFT JOIN loan_application l on l.loan_application_id = s.loan_application_id
- where l.loan_application_id is not null
- <if test="userId != null "> and s.user_id = #{userId}</if>
- <if test="enterpriseName != null and enterpriseName != ''"> and l.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
- <if test="applicationAmount != null "> and l.application_amount = #{applicationAmount}</if>
- <if test="reviewTime != null "> and l.review_time = #{reviewTime}</if>
- GROUP BY l.loan_application_id
- ORDER BY review_time desc
- </select>
- <insert id="insertLoanApplication" parameterType="LoanApplication" useGeneratedKeys="true" keyProperty="loanApplicationId">
- insert into loan_application
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="loanApplicationNumber != null">loan_application_number,</if>
- <if test="applicationType != null and applicationType != ''">application_type,</if>
- <if test="applicationAmount != null">application_amount,</if>
- <if test="actuallyAmount != null">actually_amount,</if>
- <if test="applicationBank != null and applicationBank != ''">application_bank,</if>
- <if test="usagePeriod != null and usagePeriod != ''">usage_period,</if>
- <if test="purposeFunds != null and purposeFunds != ''">purpose_funds,</if>
- <if test="repaymentSource != null and repaymentSource != ''">repayment_source,</if>
- <if test="enterpriseId != null and enterpriseId != ''">enterprise_id,</if>
- <if test="enterpriseName != null and enterpriseName != ''">enterprise_name,</if>
- <if test="categoryType != null and categoryType != ''">category_type,</if>
- <if test="isMake != null">is_make,</if>
- <if test="isNew != null">is_new,</if>
- <if test="isSmall != null">is_small,</if>
- <if test="isDuty != null">is_duty,</if>
- <if test="companyIntroduction != null">company_introduction,</if>
- <if test="customerType != null and customerType != ''">customer_type,</if>
- <if test="corporationFront != null and corporationFront != ''">corporation_front,</if>
- <if test="corporationBack != null and corporationBack != ''">corporation_back,</if>
- <if test="corporationName != null and corporationName != ''">corporation_name,</if>
- <if test="corporationIdCard != null and corporationIdCard != ''">corporation_id_card,</if>
- <if test="corporationPhone != null and corporationPhone != ''">corporation_phone,</if>
- <if test="corporationAddress != null and corporationAddress != ''">corporation_address,</if>
- <if test="corporationExpirationDate != null and corporationExpirationDate != ''">corporation_expiration_date,</if>
- <if test="familyPopulation != null and familyPopulation != ''">family_population,</if>
- <if test="corporationJob != null and corporationJob != ''">corporation_job,</if>
- <if test="isLoan != null">is_loan,</if>
- <if test="receivablePay != null">receivable_pay,</if>
- <if test="businessSituation != null">business_situation,</if>
- <if test="businessEfficiency != null">business_efficiency,</if>
- <if test="corporationMaritalStatus != null">corporation_marital_status,</if>
- <if test="spouseFront != null and spouseFront != ''">spouse_front,</if>
- <if test="spouseBack != null and spouseBack != ''">spouse_back,</if>
- <if test="spouseName != null and spouseName != ''">spouse_name,</if>
- <if test="spouseIdCard != null and spouseIdCard != ''">spouse_id_card,</if>
- <if test="spousePhone != null and spousePhone != ''">spouse_phone,</if>
- <if test="guaranteeType != null and guaranteeType != ''">guarantee_type,</if>
- <if test="guaranteeFront != null and guaranteeFront != ''">guarantee_front,</if>
- <if test="guaranteeBack != null and guaranteeBack != ''">guarantee_back,</if>
- <if test="guaranteeName != null and guaranteeName != ''">guarantee_name,</if>
- <if test="guaranteeIdCard != null and guaranteeIdCard != ''">guarantee_id_card,</if>
- <if test="guaranteePhone != null and guaranteePhone != ''">guarantee_phone,</if>
- <if test="guaranteeMaritalStatus != null">guarantee_marital_status,</if>
- <if test="guaranteeSpouseFront != null and guaranteeSpouseFront != ''">guarantee_spouse_front,</if>
- <if test="guaranteeSpouseBack != null and guaranteeSpouseBack != ''">guarantee_spouse_back,</if>
- <if test="guaranteeSpouseName != null and guaranteeSpouseName != ''">guarantee_spouse_name,</if>
- <if test="guaranteeSpouseIdCard != null and guaranteeSpouseIdCard != ''">guarantee_spouse_id_card,</if>
- <if test="guaranteeSpousePhone != null and guaranteeSpousePhone != ''">guarantee_spouse_phone,</if>
- <if test="guaranteeShareholderName != null and guaranteeShareholderName != ''">guarantee_shareholder_name,</if>
- <if test="guaranteeShareholderIdCard != null and guaranteeShareholderIdCard != ''">guarantee_shareholder_id_card,</if>
- <if test="userId != null">user_id,</if>
- <if test="idCard != null">id_card,</if>
- <if test="applicationTime != null">application_time,</if>
- <if test="fileTime != null">file_time,</if>
- <if test="reviewTime != null">review_time,</if>
- <if test="loanSchedule != null and loanSchedule != ''">loan_schedule,</if>
- <if test="auditSchedule != null and auditSchedule != ''">audit_schedule,</if>
- <if test="auditType != null and auditType != ''">audit_type,</if>
- <if test="loanApplicationType != null and loanApplicationType != ''">loan_application_type,</if>
- <if test="reviewSchedule != null and reviewSchedule != ''">review_schedule,</if>
- <if test="rejectionReason != null and rejectionReason != ''">rejection_reason,</if>
- <if test="aUserId != null">a_user_id,</if>
- <if test="aUserName != null">a_user_name,</if>
- <if test="aAuthorize != null and aAuthorize != ''">a_authorize,</if>
- <if test="bUserId != null">b_user_id,</if>
- <if test="bUserName != null">b_user_name,</if>
- <if test="fUserId != null">f_user_id,</if>
- <if test="fUserName != null">f_user_name,</if>
- <if test="createBy != null">create_by,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
- create_time
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="loanApplicationNumber != null">#{loanApplicationNumber},</if>
- <if test="applicationType != null and applicationType != ''">#{applicationType},</if>
- <if test="applicationAmount != null">#{applicationAmount},</if>
- <if test="actuallyAmount != null">#{actuallyAmount},</if>
- <if test="applicationBank != null and applicationBank != ''">#{applicationBank},</if>
- <if test="usagePeriod != null and usagePeriod != ''">#{usagePeriod},</if>
- <if test="purposeFunds != null and purposeFunds != ''">#{purposeFunds},</if>
- <if test="repaymentSource != null and repaymentSource != ''">#{repaymentSource},</if>
- <if test="enterpriseId != null and enterpriseId != ''">#{enterpriseId},</if>
- <if test="enterpriseName != null and enterpriseName != ''">#{enterpriseName},</if>
- <if test="categoryType != null and categoryType != ''">#{categoryType},</if>
- <if test="isMake != null">#{isMake},</if>
- <if test="isNew != null">#{isNew},</if>
- <if test="isSmall != null">#{isSmall},</if>
- <if test="isDuty != null">#{isDuty},</if>
- <if test="companyIntroduction != null">#{companyIntroduction},</if>
- <if test="customerType != null and customerType != ''">#{customerType},</if>
- <if test="corporationFront != null and corporationFront != ''">#{corporationFront},</if>
- <if test="corporationBack != null and corporationBack != ''">#{corporationBack},</if>
- <if test="corporationName != null and corporationName != ''">#{corporationName},</if>
- <if test="corporationIdCard != null and corporationIdCard != ''">#{corporationIdCard},</if>
- <if test="corporationPhone != null and corporationPhone != ''">#{corporationPhone},</if>
- <if test="corporationAddress != null and corporationAddress != ''">#{corporationAddress},</if>
- <if test="corporationExpirationDate != null and corporationExpirationDate != ''">#{corporationExpirationDate},</if>
- <if test="familyPopulation != null and familyPopulation != ''">#{familyPopulation},</if>
- <if test="corporationJob != null and corporationJob != ''">#{corporationJob},</if>
- <if test="isLoan != null">#{isLoan},</if>
- <if test="receivablePay != null">#{receivablePay},</if>
- <if test="businessSituation != null">#{businessSituation},</if>
- <if test="businessEfficiency != null">#{businessEfficiency},</if>
- <if test="corporationMaritalStatus != null">#{corporationMaritalStatus},</if>
- <if test="spouseFront != null and spouseFront != ''">#{spouseFront},</if>
- <if test="spouseBack != null and spouseBack != ''">#{spouseBack},</if>
- <if test="spouseName != null and spouseName != ''">#{spouseName},</if>
- <if test="spouseIdCard != null and spouseIdCard != ''">#{spouseIdCard},</if>
- <if test="spousePhone != null and spousePhone != ''">#{spousePhone},</if>
- <if test="guaranteeType != null and guaranteeType != ''">#{guaranteeType},</if>
- <if test="guaranteeFront != null and guaranteeFront != ''">#{guaranteeFront},</if>
- <if test="guaranteeBack != null and guaranteeBack != ''">#{guaranteeBack},</if>
- <if test="guaranteeName != null and guaranteeName != ''">#{guaranteeName},</if>
- <if test="guaranteeIdCard != null and guaranteeIdCard != ''">#{guaranteeIdCard},</if>
- <if test="guaranteePhone != null and guaranteePhone != ''">#{guaranteePhone},</if>
- <if test="guaranteeMaritalStatus != null">#{guaranteeMaritalStatus},</if>
- <if test="guaranteeSpouseFront != null and guaranteeSpouseFront != ''">#{guaranteeSpouseFront},</if>
- <if test="guaranteeSpouseBack != null and guaranteeSpouseBack != ''">#{guaranteeSpouseBack},</if>
- <if test="guaranteeSpouseName != null and guaranteeSpouseName != ''">#{guaranteeSpouseName},</if>
- <if test="guaranteeSpouseIdCard != null and guaranteeSpouseIdCard != ''">#{guaranteeSpouseIdCard},</if>
- <if test="guaranteeSpousePhone != null and guaranteeSpousePhone != ''">#{guaranteeSpousePhone},</if>
- <if test="guaranteeShareholderName != null and guaranteeShareholderName != ''">#{guaranteeShareholderName},</if>
- <if test="guaranteeShareholderIdCard != null and guaranteeShareholderIdCard != ''">#{guaranteeShareholderIdCard},</if>
- <if test="userId != null">#{userId},</if>
- <if test="idCard != null">#{idCard},</if>
- <if test="applicationTime != null">#{applicationTime},</if>
- <if test="fileTime != null">#{fileTime},</if>
- <if test="reviewTime != null">#{reviewTime},</if>
- <if test="loanSchedule != null and loanSchedule != ''">#{loanSchedule},</if>
- <if test="auditSchedule != null and auditSchedule != ''">#{auditSchedule},</if>
- <if test="auditType != null and auditType != ''">#{auditType},</if>
- <if test="loanApplicationType != null and loanApplicationType != ''">#{loanApplicationType},</if>
- <if test="reviewSchedule != null and reviewSchedule != ''">#{reviewSchedule},</if>
- <if test="rejectionReason != null and rejectionReason != ''">#{rejectionReason},</if>
- <if test="aUserId != null">#{aUserId},</if>
- <if test="aUserName != null">#{aUserName},</if>
- <if test="aAuthorize != null and aAuthorize != ''">#{aAuthorize},</if>
- <if test="bUserId != null">#{bUserId},</if>
- <if test="bUserName != null">#{bUserName},</if>
- <if test="fUserId != null">#{fUserId},</if>
- <if test="fUserName != null">#{fUserName},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
- sysdate()
- </trim>
- </insert>
- <update id="updateLoanApplication" parameterType="LoanApplication">
- update loan_application
- <trim prefix="SET" suffixOverrides=",">
- <if test="loanApplicationNumber != null">loan_application_number = #{loanApplicationNumber},</if>
- <if test="applicationType != null and applicationType != ''">application_type = #{applicationType},</if>
- <if test="applicationAmount != null">application_amount = #{applicationAmount},</if>
- <if test="actuallyAmount != null">actually_amount = #{actuallyAmount},</if>
- <if test="applicationBank != null and applicationBank != ''">application_bank = #{applicationBank},</if>
- <if test="usagePeriod != null and usagePeriod != ''">usage_period = #{usagePeriod},</if>
- <if test="purposeFunds != null and purposeFunds != ''">purpose_funds = #{purposeFunds},</if>
- <if test="repaymentSource != null and repaymentSource != ''">repayment_source = #{repaymentSource},</if>
- <if test="enterpriseId != null and enterpriseId != ''">enterprise_id = #{enterpriseId},</if>
- <if test="enterpriseName != null and enterpriseName != ''">enterprise_name = #{enterpriseName},</if>
- <if test="categoryType != null and categoryType != ''">category_type = #{categoryType},</if>
- <if test="isMake != null">is_make = #{isMake},</if>
- <if test="isNew != null">is_new = #{isNew},</if>
- <if test="isSmall != null">is_small = #{isSmall},</if>
- <if test="isDuty != null">is_duty = #{isDuty},</if>
- <if test="companyIntroduction != null">company_introduction = #{companyIntroduction},</if>
- <if test="customerType != null and customerType != ''">customer_type = #{customerType},</if>
- <if test="corporationFront != null and corporationFront != ''">corporation_front = #{corporationFront},</if>
- <if test="corporationBack != null and corporationBack != ''">corporation_back = #{corporationBack},</if>
- <if test="corporationName != null and corporationName != ''">corporation_name = #{corporationName},</if>
- <if test="corporationIdCard != null and corporationIdCard != ''">corporation_id_card = #{corporationIdCard},</if>
- <if test="corporationPhone != null and corporationPhone != ''">corporation_phone = #{corporationPhone},</if>
- <if test="corporationAddress != null and corporationAddress != ''">corporation_address = #{corporationAddress},</if>
- <if test="corporationExpirationDate != null and corporationExpirationDate != ''">corporation_expiration_date = #{corporationExpirationDate},</if>
- <if test="familyPopulation != null and familyPopulation != ''">family_population = #{familyPopulation},</if>
- <if test="corporationJob != null and corporationJob != ''">corporation_job = #{corporationJob},</if>
- <if test="isLoan != null">is_loan = #{isLoan},</if>
- <if test="receivablePay != null">receivable_pay = #{receivablePay},</if>
- <if test="businessSituation != null">business_situation = #{businessSituation},</if>
- <if test="businessEfficiency != null">business_efficiency = #{businessEfficiency},</if>
- <if test="corporationMaritalStatus != null">corporation_marital_status = #{corporationMaritalStatus},</if>
- <if test="spouseFront != null and spouseFront != ''">spouse_front = #{spouseFront},</if>
- <if test="spouseBack != null and spouseBack != ''">spouse_back = #{spouseBack},</if>
- <if test="spouseName != null and spouseName != ''">spouse_name = #{spouseName},</if>
- <if test="spouseIdCard != null and spouseIdCard != ''">spouse_id_card = #{spouseIdCard},</if>
- <if test="spousePhone != null and spousePhone != ''">spouse_phone = #{spousePhone},</if>
- <if test="guaranteeType != null and guaranteeType != ''">guarantee_type = #{guaranteeType},</if>
- <if test="guaranteeFront != null and guaranteeFront != ''">guarantee_front = #{guaranteeFront},</if>
- <if test="guaranteeBack != null and guaranteeBack != ''">guarantee_back = #{guaranteeBack},</if>
- <if test="guaranteeName != null and guaranteeName != ''">guarantee_name = #{guaranteeName},</if>
- <if test="guaranteeIdCard != null and guaranteeIdCard != ''">guarantee_id_card = #{guaranteeIdCard},</if>
- <if test="guaranteePhone != null and guaranteePhone != ''">guarantee_phone = #{guaranteePhone},</if>
- <if test="guaranteeMaritalStatus != null">guarantee_marital_status = #{guaranteeMaritalStatus},</if>
- <if test="guaranteeSpouseFront != null and guaranteeSpouseFront != ''">guarantee_spouse_front = #{guaranteeSpouseFront},</if>
- <if test="guaranteeSpouseBack != null and guaranteeSpouseBack != ''">guarantee_spouse_back = #{guaranteeSpouseBack},</if>
- <if test="guaranteeSpouseName != null and guaranteeSpouseName != ''">guarantee_spouse_name = #{guaranteeSpouseName},</if>
- <if test="guaranteeSpouseIdCard != null and guaranteeSpouseIdCard != ''">guarantee_spouse_id_card = #{guaranteeSpouseIdCard},</if>
- <if test="guaranteeSpousePhone != null and guaranteeSpousePhone != ''">guarantee_spouse_phone = #{guaranteeSpousePhone},</if>
- <if test="guaranteeShareholderName != null and guaranteeShareholderName != ''">guarantee_shareholder_name = #{guaranteeShareholderName},</if>
- <if test="guaranteeShareholderIdCard != null and guaranteeShareholderIdCard != ''">guarantee_shareholder_id_card = #{guaranteeShareholderIdCard},</if>
- <if test="userId != null">user_id = #{userId},</if>
- <if test="idCard != null">id_card = #{idCard},</if>
- <if test="applicationTime != null">application_time = #{applicationTime},</if>
- <if test="fileTime != null">file_time = #{fileTime},</if>
- <if test="reviewTime != null">review_time = #{reviewTime},</if>
- <if test="loanSchedule != null and loanSchedule != ''">loan_schedule = #{loanSchedule},</if>
- <if test="auditSchedule != null and auditSchedule != ''">audit_schedule = #{auditSchedule},</if>
- <if test="auditType != null and auditType != ''">audit_type = #{auditType},</if>
- <if test="loanApplicationType != null and loanApplicationType != ''">loan_application_type = #{loanApplicationType},</if>
- <if test="reviewSchedule != null and reviewSchedule != ''">review_schedule = #{reviewSchedule},</if>
- <if test="rejectionReason != null and rejectionReason != ''">rejection_reason = #{rejectionReason},</if>
- <if test="aUserId != null">a_user_id = #{aUserId},</if>
- <if test="aUserName != null">a_user_name = #{aUserName},</if>
- <if test="aAuthorize != null and aAuthorize != ''">a_authorize = #{aAuthorize},</if>
- <if test="bUserId != null">b_user_id = #{bUserId},</if>
- <if test="bUserName != null">b_user_name = #{bUserName},</if>
- <if test="fUserId != null">f_user_id = #{fUserId},</if>
- <if test="fUserName != null">f_user_name = #{fUserName},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="remark != null">remark = #{remark},</if>
- update_time = sysdate(),
- </trim>
- where loan_application_id = #{loanApplicationId}
- </update>
- <delete id="deleteLoanApplicationByLoanApplicationId" parameterType="Long">
- delete from loan_application where loan_application_id = #{loanApplicationId}
- </delete>
- <delete id="deleteLoanApplicationByLoanApplicationIds" parameterType="String">
- delete from loan_application where loan_application_id in
- <foreach item="loanApplicationId" collection="array" open="(" separator="," close=")">
- #{loanApplicationId}
- </foreach>
- </delete>
- </mapper>
|