|
|
|
@ -4,42 +4,44 @@ |
|
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 --> |
|
|
|
|
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgGuaranteeLetterAssignUser"> |
|
|
|
|
<id column="id" property="id" /> |
|
|
|
|
<result column="business_id" property="businessId" /> |
|
|
|
|
<result column="company_id" property="companyId" /> |
|
|
|
|
<result column="user_id" property="userId" /> |
|
|
|
|
<result column="status" property="status" /> |
|
|
|
|
<result column="create_time" property="createTime" /> |
|
|
|
|
<result column="update_time" property="updateTime" /> |
|
|
|
|
<id column="id" property="id"/> |
|
|
|
|
<result column="business_id" property="businessId"/> |
|
|
|
|
<result column="company_id" property="companyId"/> |
|
|
|
|
<result column="user_id" property="userId"/> |
|
|
|
|
<result column="status" property="status"/> |
|
|
|
|
<result column="create_time" property="createTime"/> |
|
|
|
|
<result column="update_time" property="updateTime"/> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<resultMap id="GuaranteeLetterListResponseMap" type="com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse"> |
|
|
|
|
<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="role_id" property="roleId" /> |
|
|
|
|
<resultMap id="GuaranteeLetterListResponseMap" |
|
|
|
|
type="com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse"> |
|
|
|
|
<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="role_id" property="roleId"/> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<select id="pageByCondition" resultMap="GuaranteeLetterListResponseMap"> |
|
|
|
|
select lau.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_money,lcc.loan_tern,aai.create_time,lau.status, |
|
|
|
|
select |
|
|
|
|
lau.id,aai.business_code,cc.name,cc.phone,aai.business_type,lcc.loan_money,lcc.loan_tern,aai.create_time,lau.status, |
|
|
|
|
aai.bank,lcc.passing_time,lcc.file,lau.audit_opinion,lau.operating_status,bps.business_status,lau.business_id,lau.role_id |
|
|
|
|
from dg_guarantee_letter_assign_user lau |
|
|
|
|
left join dg_apply_amount_info aai on lau.business_id = aai.id |
|
|
|
|
left join dg_business_company cc on cc.business_id = aai.id |
|
|
|
|
/* left join crms_company_customer ccc on lau.company_id = ccc.id |
|
|
|
|
/* left join crms_company_customer ccc on lau.company_id = ccc.id |
|
|
|
|
left join crms_customer cc on ccc.customer_id = cc.id*/ |
|
|
|
|
left join dg_loan_committee_consider lcc on lau.business_id = lcc.business_id |
|
|
|
|
left join dg_business_process_status bps on lau.business_id = bps.business_id |
|
|
|
@ -52,7 +54,8 @@ |
|
|
|
|
AND (lau.user_id = #{userId} or lau.user_id is null OR lau.user_id = '') |
|
|
|
|
</if> |
|
|
|
|
<if test="customerNumberOrName != null and customerNumberOrName != ''"> |
|
|
|
|
AND (aai.business_code LIKE CONCAT('%' #{customerNumberOrName} '%') OR cc.name LIKE CONCAT('%' #{customerNumberOrName} '%')) |
|
|
|
|
AND (aai.business_code LIKE CONCAT('%' #{customerNumberOrName} '%') OR cc.name LIKE CONCAT('%' |
|
|
|
|
#{customerNumberOrName} '%')) |
|
|
|
|
</if> |
|
|
|
|
<if test="status != null and status != ''"> |
|
|
|
|
AND lau.status = #{status} |
|
|
|
@ -68,7 +71,7 @@ |
|
|
|
|
from dg_guarantee_letter_assign_user lau |
|
|
|
|
left join dg_apply_amount_info aai on lau.business_id = aai.id |
|
|
|
|
left join dg_business_company cc on cc.business_id = aai.id |
|
|
|
|
/* left join crms_company_customer ccc on lau.company_id = ccc.id |
|
|
|
|
/* left join crms_company_customer ccc on lau.company_id = ccc.id |
|
|
|
|
left join crms_customer cc on ccc.customer_id = cc.id*/ |
|
|
|
|
left join dg_loan_committee_consider lcc on lau.business_id = lcc.business_id |
|
|
|
|
left join dg_business_process_status bps on lau.business_id = bps.business_id |
|
|
|
@ -78,7 +81,8 @@ |
|
|
|
|
</foreach> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="selectGuaranteeLetter" resultType="com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse"> |
|
|
|
|
<select id="selectGuaranteeLetter" |
|
|
|
|
resultType="com.daqing.financial.guarantee.model.response.GuaranteeLetterListResponse"> |
|
|
|
|
select cc.name,lcc.loan_money,lcc.loan_tern,aai.bank,lcc.passing_time |
|
|
|
|
from dg_guarantee_letter_assign_user lau |
|
|
|
|
left join dg_apply_amount_info aai on lau.business_id = aai.id |
|
|
|
@ -89,8 +93,10 @@ |
|
|
|
|
where lau.business_id = #{businessId} and lau.role_id = #{roleId} |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="selectGuaranteeLetterList" 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, |
|
|
|
|
<select id="selectGuaranteeLetterList" |
|
|
|
|
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_guarantee_letter_assign_user au |
|
|
|
|
left join dg_apply_amount_info ai on au.business_id = ai.id |
|
|
|
|