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.
102 lines
5.6 KiB
102 lines
5.6 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.DgPaymentConfirmationConsiderMapper"> |
|
|
|
<!-- 通用查询映射结果 --> |
|
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgPaymentConfirmationConsider"> |
|
<id column="id" property="id" /> |
|
<result column="company_id" property="companyId" /> |
|
<result column="consider_id" property="considerId" /> |
|
<result column="audit_opinion" property="auditOpinion" /> |
|
<result column="status" property="status" /> |
|
<result column="img_file" property="imgFile" /> |
|
<result column="create_time" property="createTime" /> |
|
<result column="update_time" property="updateTime" /> |
|
</resultMap> |
|
|
|
<resultMap id="PaymentConfirmationListResponseMap" type="com.daqing.financial.guarantee.model.response.PaymentConfirmationListResponse"> |
|
<id column="id" property="id" /> |
|
<result column="business_code" property="businessCode" /> |
|
<result column="bank" property="bank" /> |
|
<result column="passing_time" property="passingTime" /> |
|
<result column="file" property="file" /> |
|
<result column="name" property="name" /> |
|
<result column="phone" property="phone" /> |
|
<result column="status" property="status" /> |
|
<result column="create_time" property="createTime" /> |
|
<result column="loan_tern" property="loanTern" /> |
|
<result column="loan_money" property="loanMoney" /> |
|
<result column="business_type" property="businessType" /> |
|
<result column="audit_opinion" property="auditOpinion" /> |
|
<result column="operating_status" property="operatingStatus" /> |
|
<result column="business_status" property="businessStatus" /> |
|
<result column="business_id" property="businessId" /> |
|
<result column="img_file" property="imgFile" /> |
|
<result column="role_id" property="roleId" /> |
|
</resultMap> |
|
|
|
<select id="pageByCondition" resultMap="PaymentConfirmationListResponseMap"> |
|
select pcc.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_money,lcc.loan_tern,aai.create_time,pcc.status, |
|
aai.bank,lcc.passing_time,lcc.file,pcc.audit_opinion,pcc.operating_status,bps.business_status,pcc.business_id,pcc.img_file,pcc.role_id |
|
from dg_payment_confirmation_consider pcc |
|
left join dg_apply_amount_info aai on pcc.business_id = aai.id |
|
left join dg_business_company cc on cc.business_id = aai.id |
|
/* left join crms_company_customer ccc on pcc.company_id = ccc.id |
|
left join crms_customer cc on ccc.customer_id = cc.id*/ |
|
left join dg_loan_committee_consider lcc on pcc.business_id = lcc.business_id |
|
left join dg_business_process_status bps on pcc.business_id = bps.business_id |
|
<where> |
|
pcc.role_id in |
|
<foreach collection="roleIdList" open="(" separator="," close=")" item="id"> |
|
#{id} |
|
</foreach> |
|
<if test="userId != null and userId != ''"> |
|
AND (pcc.consider_id = #{userId} or pcc.consider_id is null OR pcc.consider_id = '') |
|
</if> |
|
<if test="customerNumberOrName != null and customerNumberOrName != ''"> |
|
AND (aai.business_code LIKE CONCAT('%' #{customerNumberOrName} '%') OR cc.name LIKE CONCAT('%' #{customerNumberOrName} '%')) |
|
</if> |
|
<if test="status != null and status != ''"> |
|
AND pcc.status = #{status} |
|
</if> |
|
</where> |
|
</select> |
|
|
|
|
|
<select id="selectBatchData" resultMap="PaymentConfirmationListResponseMap"> |
|
select pcc.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_money, |
|
lcc.loan_tern,aai.create_time,pcc.status,pcc.operating_status,bps.business_status |
|
from dg_payment_confirmation_consider pcc |
|
left join dg_apply_amount_info aai on pcc.business_id = aai.id |
|
left join dg_business_company cc on cc.business_id = aai.id |
|
/* left join crms_company_customer ccc on pcc.company_id = ccc.id |
|
left join crms_customer cc on ccc.customer_id = cc.id*/ |
|
left join dg_loan_committee_consider lcc on pcc.business_id = lcc.business_id |
|
left join dg_business_process_status bps on pcc.business_id = bps.business_id |
|
where pcc.id in |
|
<foreach collection="list" close=")" open="(" item="id" separator=","> |
|
#{id} |
|
</foreach> |
|
</select> |
|
|
|
<select id="selectPaymentConfirmationList" resultType="com.daqing.financial.guarantee.model.response.DgNoticeListResponse"> |
|
select au.id,au.role_id,au.company_id,au.business_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_payment_confirmation_consider 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.role_id in |
|
<foreach collection="roleIdlist" open="(" separator="," close=")" item="id"> |
|
#{id} |
|
</foreach> |
|
<if test="userId != null and userId != ''"> |
|
AND (au.consider_id =#{userId} or au.consider_id is null or au.consider_id ='') |
|
</if> |
|
AND au.operating_status=1 |
|
</where> |
|
</select> |
|
|
|
</mapper>
|
|
|