Merge branch 'dev' of http://59.110.10.99:53000/liuc/biz_supplier_manage into dev
This commit is contained in:
@ -25,8 +25,35 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoSupplierBankVo">
|
||||
select id, supplier_id, interbank_number, bank, swift_code, account_name, account, currency, nation, province, city, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
||||
from cosco_supplier_bank
|
||||
SELECT
|
||||
csb.id,
|
||||
csb.supplier_id,
|
||||
csb.interbank_number,
|
||||
csb.bank,
|
||||
csb.swift_code,
|
||||
csb.account_name,
|
||||
csb.account,
|
||||
csb.currency,
|
||||
dpbz.dic_name as currencyName,
|
||||
csb.nation,
|
||||
COALESCE(drn.`name`, dri.`name`) as nationName,
|
||||
csb.province,
|
||||
drp.`name` as provinceName,
|
||||
csb.city,
|
||||
drc.`name` as cityName,
|
||||
csb.del_flag,
|
||||
csb.create_by,
|
||||
csb.create_time,
|
||||
csb.update_by,
|
||||
csb.update_time,
|
||||
csb.last_update_time
|
||||
FROM
|
||||
cosco_supplier_bank csb
|
||||
left join dict_project dpbz on csb.currency = dpbz.`code` and dpbz.parent_code = 'currency'
|
||||
left join dict_region drn on csb.nation = drn.id
|
||||
left join dict_region drp on csb.province = drp.id
|
||||
left join dict_region drc on csb.city = drc.id
|
||||
left join dict_region_international dri on csb.nation = dri.id
|
||||
</sql>
|
||||
|
||||
|
||||
@ -34,57 +61,57 @@
|
||||
<include refid="selectCoscoSupplierBankVo"/>
|
||||
<where>
|
||||
<if test="vo.supplierId != null and vo.supplierId != ''">
|
||||
and supplier_id = #{vo.supplierId}
|
||||
and csb.supplier_id = #{vo.supplierId}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
order by csb.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierBankList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank" resultMap="CoscoSupplierBankResult">
|
||||
<include refid="selectCoscoSupplierBankVo"/>
|
||||
<where>
|
||||
and del_flag = 'normal'
|
||||
and csb.del_flag = 'normal'
|
||||
<if test="supplierId != null and supplierId != ''">
|
||||
and supplier_id = #{supplierId}
|
||||
and csb.supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="interbankNumber != null and interbankNumber != ''">
|
||||
and interbank_number = #{interbankNumber}
|
||||
and csb.interbank_number = #{interbankNumber}
|
||||
</if>
|
||||
<if test="bank != null and bank != ''">
|
||||
and bank = #{bank}
|
||||
and csb.bank = #{bank}
|
||||
</if>
|
||||
<if test="swiftCode != null and swiftCode != ''">
|
||||
and swift_code = #{swiftCode}
|
||||
and csb.swift_code = #{swiftCode}
|
||||
</if>
|
||||
<if test="accountName != null and accountName != ''">
|
||||
and account_name like concat('%', #{accountName}, '%')
|
||||
and csb.account_name like concat('%', #{accountName}, '%')
|
||||
</if>
|
||||
<if test="account != null and account != ''">
|
||||
and account = #{account}
|
||||
and csb.account = #{account}
|
||||
</if>
|
||||
<if test="currency != null and currency != ''">
|
||||
and currency = #{currency}
|
||||
and csb.currency = #{currency}
|
||||
</if>
|
||||
<if test="nation != null and nation != ''">
|
||||
and nation = #{nation}
|
||||
and csb.nation = #{nation}
|
||||
</if>
|
||||
<if test="province != null and province != ''">
|
||||
and province = #{province}
|
||||
and csb.province = #{province}
|
||||
</if>
|
||||
<if test="city != null and city != ''">
|
||||
and city = #{city}
|
||||
and csb.csb.city = #{city}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
and csb.last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
order by csb.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoSupplierBankById" parameterType="String"
|
||||
resultMap="CoscoSupplierBankResult">
|
||||
<include refid="selectCoscoSupplierBankVo"/>
|
||||
where id = #{id}
|
||||
where csb.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCoscoSupplierBank" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank">
|
||||
|
@ -59,84 +59,88 @@
|
||||
<sql id="selectCoscoSupplierBaseVo">
|
||||
SELECT
|
||||
csb.id,
|
||||
dept_id,
|
||||
supplier_type,
|
||||
CASE supplier_type
|
||||
csb.dept_id,
|
||||
csb.supplier_type,
|
||||
CASE csb.supplier_type
|
||||
WHEN 'dvs' THEN '境内企业'
|
||||
WHEN 'ovs' THEN '境外企业'
|
||||
WHEN 'pe' THEN '个人'
|
||||
ELSE supplier_type
|
||||
END AS supplier_type_cn,
|
||||
CASE
|
||||
WHEN supplier_type = 'dvs' THEN social_credit_code
|
||||
WHEN supplier_type = 'ovs' THEN vat
|
||||
WHEN supplier_type = 'pe' THEN id_card
|
||||
WHEN csb.supplier_type = 'dvs' THEN social_credit_code
|
||||
WHEN csb.supplier_type = 'ovs' THEN vat
|
||||
WHEN csb.supplier_type = 'pe' THEN id_card
|
||||
ELSE NULL
|
||||
END AS unified_code,
|
||||
licence_accessory,
|
||||
licence_date,
|
||||
enterprise_type,
|
||||
csb.licence_accessory,
|
||||
csb.licence_date,
|
||||
csb.enterprise_type,
|
||||
dp.dic_name as enterprise_type_cn,
|
||||
name,
|
||||
name_en,
|
||||
social_credit_code,
|
||||
`range`,
|
||||
reg_address,
|
||||
work_address,
|
||||
parent_company_investor,
|
||||
legal_person,
|
||||
id_card,
|
||||
capital,
|
||||
contacts_name,
|
||||
contacts_phone,
|
||||
contacts_type,
|
||||
contacts_email,
|
||||
telephone,
|
||||
nation,
|
||||
vat,
|
||||
taxpayer_id,
|
||||
currency,
|
||||
csb.name,
|
||||
csb.name_en,
|
||||
csb.social_credit_code,
|
||||
csb.`range`,
|
||||
csb.reg_address,
|
||||
csb.work_address,
|
||||
csb.parent_company_investor,
|
||||
csb.legal_person,
|
||||
csb.id_card,
|
||||
csb.capital,
|
||||
csb.contacts_name,
|
||||
csb.contacts_phone,
|
||||
csb.contacts_type,
|
||||
dpc.dic_name as contactsTypeName,
|
||||
csb.contacts_email,
|
||||
csb.telephone,
|
||||
csb.nation,
|
||||
dri.`name` as nationName,
|
||||
csb.vat,
|
||||
csb.taxpayer_id,
|
||||
csb.currency,
|
||||
dpbz.dic_name as currency_cn,
|
||||
person_name,
|
||||
person_phone,
|
||||
person_bank,
|
||||
person_account,
|
||||
remark,
|
||||
access_status,
|
||||
CASE access_status
|
||||
csb.person_name,
|
||||
csb.person_phone,
|
||||
csb.person_bank,
|
||||
csb.person_account,
|
||||
csb.remark,
|
||||
csb.access_status,
|
||||
CASE csb.access_status
|
||||
WHEN 0 THEN '未准入'
|
||||
WHEN 1 THEN '已准入'
|
||||
ELSE CAST(access_status AS CHAR)
|
||||
END AS access_status_cn,
|
||||
blacklist_status,
|
||||
CASE blacklist_status
|
||||
csb.blacklist_status,
|
||||
CASE csb.blacklist_status
|
||||
WHEN 0 THEN '未加入'
|
||||
WHEN 1 THEN '已加入'
|
||||
ELSE CAST(blacklist_status AS CHAR)
|
||||
END AS blacklist_status_cn,
|
||||
greylist_status,
|
||||
CASE greylist_status
|
||||
csb.greylist_status,
|
||||
CASE csb.greylist_status
|
||||
WHEN 0 THEN '未加入'
|
||||
WHEN 1 THEN '已加入'
|
||||
ELSE CAST(greylist_status AS CHAR)
|
||||
END AS greylist_status_cn,
|
||||
fillin_status,
|
||||
CASE fillin_status
|
||||
csb.fillin_status,
|
||||
CASE csb.fillin_status
|
||||
WHEN 0 THEN '否'
|
||||
WHEN 1 THEN '是'
|
||||
ELSE CAST(fillin_status AS CHAR)
|
||||
END AS fillin_status_cn,
|
||||
fillin_by,
|
||||
sap_code,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
last_update_time
|
||||
csb.fillin_by,
|
||||
csb.sap_code,
|
||||
csb.create_by,
|
||||
csb.create_time,
|
||||
csb.update_by,
|
||||
csb.update_time,
|
||||
csb.last_update_time
|
||||
FROM
|
||||
cosco_supplier_base csb
|
||||
left join dict_project dp on csb.enterprise_type = dp.`code` and dp.parent_code = 'enterprise_type'
|
||||
left join dict_project dpbz on csb.currency = dpbz.`code` and dpbz.parent_code = 'currency'
|
||||
left join dict_project dpc on csb.contacts_type = dpc.`code` and dpc.parent_code = 'contacts_type'
|
||||
left join dict_region_international dri on csb.nation = dri.id
|
||||
</sql>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user