You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
5.5 KiB
80 lines
5.5 KiB
<?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.daqing.financial.guarantee.mapper.DgApplyAmountInfoMapper"> |
|
|
|
<!-- 通用查询映射结果 --> |
|
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgApplyAmountInfo"> |
|
<id column="id" property="id" /> |
|
<result column="company_id" property="companyId" /> |
|
<result column="presenter_id" property="presenterId" /> |
|
<result column="apply_amount" property="applyAmount" /> |
|
<result column="apply_time" property="applyTime" /> |
|
<result column="bank" property="bank" /> |
|
<result column="amount_wide" property="amountWide" /> |
|
<result column="en_guarantee_measures" property="enGuaranteeMeasures" /> |
|
<result column="description" property="description" /> |
|
<result column="customer_type" property="customerType" /> |
|
<result column="business_type" property="businessType" /> |
|
<result column="create_time" property="createTime" /> |
|
<result column="update_time" property="updateTime" /> |
|
<result column="operating_status" property="operatingStatus" /> |
|
<result column="role_id" property="roleId" /> |
|
<result column="type" property="type" /> |
|
</resultMap> |
|
<select id="pageByCondition" resultType="com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse"> |
|
select ai.id,ai.company_id,ai.presenter_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,ai.create_time, |
|
ai.status,cc.name,cc.phone |
|
from dg_apply_amount_info ai |
|
left join crms_company_customer ccl on ai.company_id = ccl.id |
|
left join crms_customer cc on cc.id = ccl.customer_id |
|
<where> |
|
<if test="CustomerNumberOrName != null and CustomerNumberOrName != ''"> |
|
AND ai.business_code LIKE CONCAT('%',#{CustomerNumberOrName},'%') OR cc.name LIKE CONCAT('%',#{CustomerNumberOrName},'%') |
|
</if> |
|
</where> |
|
</select> |
|
|
|
<select id="excelList" resultType="com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse"> |
|
select ai.id,ai.company_id,ai.presenter_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,ai.create_time, |
|
ai.status,cc.name,cc.phone |
|
from dg_apply_amount_info ai |
|
left join crms_company_customer ccl on ai.company_id = ccl.id |
|
left join crms_customer cc on cc.id = ccl.customer_id |
|
</select> |
|
|
|
<select id="selectApplyAmountInfoById" resultType="com.daqing.financial.guarantee.model.response.DgApplyAmountInfoResponse"> |
|
select * from dg_apply_amount_info where id=#{id} |
|
</select> |
|
|
|
<select id="selectListByIds" resultType="com.daqing.financial.guarantee.model.response.BusinessApplicationListResponse"> |
|
select au.id,ai.company_id,au.business_id,ai.presenter_id,ai.business_code,ai.business_type,ai.apply_amount,ai.apply_time,au.create_time, |
|
au.status,au.operating_status,cc.name,cc.phone,ps.business_status |
|
from dg_apply_amount_list au |
|
left join dg_apply_amount_info ai on au.business_id = ai.id |
|
left join crms_company_customer ccl on ai.company_id = ccl.id |
|
left join crms_customer cc on cc.id = ccl.customer_id |
|
left JOIN dg_business_process_status ps ON ps.business_id = au.business_id |
|
where au.id in |
|
<foreach collection="list" close=")" open="(" item="id" separator=","> |
|
#{id} |
|
</foreach> |
|
</select> |
|
|
|
<select id="queryApplyField" resultType="com.daqing.framework.domain.guarantee.DgApplyField"> |
|
SELECT * FROM dg_apply_field |
|
</select> |
|
|
|
<update id="updateApplyField" parameterType="com.daqing.framework.domain.guarantee.DgApplyField"> |
|
UPDATE dg_apply_field SET |
|
customer_type = #{af.customerType},customer_code = #{af.customerCode},customer_name = #{af.customerName},customer_unicode = #{af.customerUnicode},customer_phone = #{af.customerPhone},register_time = #{af.registerTime}, |
|
register_fund =#{af.registerFund},register_addr = #{af.registerAddr},employee_number = #{af.employeeNumber},business_addr = #{af.businessAddr},business_type = #{af.businessType},business_scope = #{af.businessScope}, |
|
legal_person_name = #{af.legalPersonName},legal_person_sex = #{af.legalPersonSex},legal_person_card = #{af.legalPersonCard},legal_person_phone = #{af.legalPersonPhone},legal_person_account = #{af.legalPersonAccount}, |
|
legal_person_addr = #{af.legalPersonAddr},legal_person_affiliated_person = #{af.legalPersonAffiliatedPerson},loans_amount = #{af.loansAmount},loans_time_limit = #{af.loansTimeLimit},loans_bank = #{af.loansBank} , |
|
loans_use = #{af.loansUse},loans_else_use = #{af.loansElseUse},loans_measure = #{af.loansMeasure},accessory_business_license = #{af.accessoryBusinessLicense}, |
|
accessory_id_card = #{af.accessoryIdCard},accessory_marriage_certificate = #{af.accessoryMarriageCertificate},accessory_person_card = #{af.accessoryPersonCard},accessory_constitution = #{af.accessoryConstitution}, |
|
accessory_audit = #{af.accessoryAudit},accessory_credit = #{af.accessoryCredit},accessory_couple_credit = #{af.accessoryCoupleCredit},accessory_commitment = #{af.accessoryCommitment},accessory_prove = #{af.accessoryProve}, |
|
accessory_conference = #{af.accessoryConference},accessory_assess = #{af.accessoryAssess},update_time = #{af.updateTime} |
|
WHERE id = #{af.id} |
|
</update> |
|
|
|
</mapper>
|
|
|