删除 字典代码
This commit is contained in:
@ -10,8 +10,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoAccessCategoryVo">
|
||||
select a.category_name as categoryName,c.access_work_id, c.category_id from cosco_access_category c
|
||||
left join cosco_category a on c.category_id = a.id
|
||||
select c.access_work_id, c.category_id from cosco_access_category c
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoAccessCategoryList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessCategory" resultMap="CoscoAccessCategoryResult">
|
||||
@ -25,14 +24,12 @@
|
||||
SELECT
|
||||
cac.category_id,
|
||||
cas.supplier_id,
|
||||
cc.category_name as categoryName,
|
||||
CASE
|
||||
WHEN csb.supplier_type = 'ovs' THEN
|
||||
name_en ELSE name
|
||||
END AS supplierName
|
||||
from cosco_access_work caw
|
||||
left join cosco_access_category cac on caw.id = cac.access_work_id
|
||||
left join cosco_category cc on cc.id = cac.category_id and cc.del_flag = 'normal'
|
||||
left join cosco_access_supplier cas on caw.id = cas.access_work_id
|
||||
LEFT JOIN cosco_supplier_base csb ON cas.supplier_id = csb.id and csb.del_flag = 'normal'
|
||||
LEFT JOIN cosco_access_supplier_category casc ON casc.category_id = cac.category_id AND casc.dept_id = #{deptId} and cas.supplier_id = casc.supplier_id and casc.del_flag = 'normal'
|
||||
|
@ -23,7 +23,6 @@
|
||||
<sql id="selectCoscoAccessSupplierCategoryVo">
|
||||
SELECT
|
||||
s.`name`,
|
||||
ca.category_name,
|
||||
c.id,
|
||||
c.access_work_id,
|
||||
c.supplier_id,
|
||||
@ -42,7 +41,6 @@
|
||||
FROM
|
||||
cosco_access_supplier_category c
|
||||
left join cosco_supplier_base s on c.supplier_id = s.id and s.del_flag = 'normal'
|
||||
left join cosco_category ca on c.category_id = ca.id and ca.del_flag = 'normal'
|
||||
left join cosco_supplierexit cse on c.supplierexit_id = cse.id and cse.del_flag = 'normal'
|
||||
</sql>
|
||||
|
||||
@ -128,7 +126,6 @@
|
||||
CASE
|
||||
WHEN s.supplier_type = 'ovs' THEN
|
||||
name_en ELSE name END AS supplierName,
|
||||
ca.category_name as categoryName,
|
||||
c.id,
|
||||
c.access_work_id,
|
||||
c.supplier_id,
|
||||
@ -143,7 +140,6 @@
|
||||
FROM
|
||||
cosco_access_supplier_category c
|
||||
left join cosco_supplier_base s on c.supplier_id = s.id and s.del_flag = 'normal'
|
||||
left join cosco_category ca on c.category_id = ca.id and ca.del_flag = 'normal'
|
||||
left join (
|
||||
select cssc.category_id from cosco_supplierexit_supplier_category cssc
|
||||
left join cosco_supplierexit cs on cs.id = cssc.supplierexit_id
|
||||
@ -161,20 +157,6 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCategoryNameList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" resultMap="CoscoAccessSupplierCategoryResult">
|
||||
SELECT
|
||||
c.id,
|
||||
(
|
||||
SELECT GROUP_CONCAT(p.category_name ORDER BY FIND_IN_SET(p.id, c.ancestors) SEPARATOR '-')
|
||||
FROM cosco_category p
|
||||
WHERE FIND_IN_SET(p.id, c.ancestors)
|
||||
) AS categoryName
|
||||
FROM cosco_category c
|
||||
WHERE c.id IN
|
||||
<foreach collection="categoryList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
<result property="orgId" column="org_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="supplierexitId" column="supplierexit_id"/>
|
||||
<collection property="categoryNameList"
|
||||
<collection property="categoryIdList"
|
||||
column="{supplierId=supplier_id}"
|
||||
ofType="string"
|
||||
select="selectCoscoAccessCategoryList">
|
||||
@ -90,8 +90,7 @@
|
||||
<select id="selectCoscoAccessCategoryList"
|
||||
parameterType="map"
|
||||
resultType="string">
|
||||
select a.category_name as categoryName from cosco_access_supplier_category c
|
||||
left join cosco_category a on c.category_id = a.id and a.del_flag = 'normal'
|
||||
select c.category_id from cosco_access_supplier_category c
|
||||
where c.supplier_id = #{supplierId} and c.del_flag = 'normal'
|
||||
</select>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="lastUpdateTime" column="last_update_time"/>
|
||||
<collection property="categoryNameList"
|
||||
<collection property="categoryIdList"
|
||||
column="{accessWorkId=id}"
|
||||
ofType="string"
|
||||
select="selectCoscoAccessCategoryList">
|
||||
@ -123,8 +123,7 @@
|
||||
<select id="selectCoscoAccessCategoryList"
|
||||
parameterType="map"
|
||||
resultType="string">
|
||||
select a.category_name as categoryName from cosco_access_category c
|
||||
left join cosco_category a on c.category_id = a.id and a.del_flag = 'normal'
|
||||
select c.category_id from cosco_access_category c
|
||||
where c.access_work_id = #{accessWorkId}
|
||||
</select>
|
||||
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork" resultMap="CoscoAccessWorkResult">
|
||||
|
@ -21,12 +21,10 @@
|
||||
m.content,
|
||||
m.`read`,
|
||||
m.type,
|
||||
dp.dic_name as typeCn,
|
||||
m.create_time,
|
||||
m.update_time
|
||||
FROM
|
||||
cosco_message m
|
||||
left join dict_project dp on m.type = dp.`code` and dp.parent_code = 'message_type'
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoMessagePage" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoMessage" resultMap="CoscoMessageResult">
|
||||
|
@ -34,13 +34,9 @@
|
||||
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,
|
||||
@ -49,11 +45,6 @@
|
||||
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>
|
||||
|
||||
|
||||
|
@ -76,7 +76,6 @@
|
||||
csb.licence_accessory,
|
||||
csb.licence_date,
|
||||
csb.enterprise_type,
|
||||
dp.dic_name as enterprise_type_cn,
|
||||
csb.name,
|
||||
csb.name_en,
|
||||
csb.social_credit_code,
|
||||
@ -90,15 +89,12 @@
|
||||
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,
|
||||
csb.person_name,
|
||||
csb.person_phone,
|
||||
csb.person_bank,
|
||||
@ -137,16 +133,12 @@
|
||||
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>
|
||||
|
||||
<!-- 我的供应商 -->
|
||||
<sql id="selectMySupplierBaseVo">
|
||||
SELECT
|
||||
c.categoryName,
|
||||
c.categoryId,
|
||||
CASE supplier_type
|
||||
WHEN 'dvs' THEN '境内企业'
|
||||
WHEN 'ovs' THEN '境外企业'
|
||||
@ -159,7 +151,6 @@
|
||||
ELSE NULL
|
||||
END AS unified_code,
|
||||
csb.enterprise_type,
|
||||
dp.dic_name as enterprise_type_cn,
|
||||
csb.id,
|
||||
cas.access_work_id,
|
||||
cas.supplier_id,
|
||||
@ -179,12 +170,10 @@
|
||||
left join (
|
||||
SELECT
|
||||
cac.access_work_id,
|
||||
GROUP_CONCAT(cc.category_name SEPARATOR ', ') AS categoryName
|
||||
GROUP_CONCAT(cac.category_id SEPARATOR ', ') AS categoryId
|
||||
FROM cosco_access_category cac
|
||||
INNER JOIN cosco_category cc ON cac.category_id = cc.id and cc.del_flag = 'normal'
|
||||
GROUP BY cac.access_work_id
|
||||
) as c on c.access_work_id = caw.id
|
||||
left join dict_project dp on csb.enterprise_type = dp.`code` and dp.parent_code = 'enterprise_type'
|
||||
</sql>
|
||||
|
||||
<!-- 合格、个人的供应商 -->
|
||||
@ -203,7 +192,6 @@
|
||||
END AS unified_code,
|
||||
csb.supplier_type,
|
||||
csb.enterprise_type,
|
||||
dp.dic_name as enterprise_type_cn,
|
||||
csb.id,
|
||||
cas.access_work_id,
|
||||
cas.supplier_id,
|
||||
@ -233,7 +221,6 @@
|
||||
cosco_access_supplier cas
|
||||
LEFT JOIN cosco_access_work caw ON cas.access_work_id = caw.id and caw.del_flag = 'normal'
|
||||
LEFT JOIN cosco_supplier_base csb ON cas.supplier_id = csb.id and csb.del_flag = 'normal'
|
||||
left join dict_project dp on csb.enterprise_type = dp.`code` and dp.parent_code = 'enterprise_type'
|
||||
</sql>
|
||||
|
||||
<!--未准入的供应商 -->
|
||||
|
@ -125,7 +125,6 @@
|
||||
ELSE sb.`name`
|
||||
END AS supplierName,
|
||||
sb.enterprise_type,
|
||||
dp.dic_name as enterprise_type_cn,
|
||||
c.change_by,
|
||||
c.change_time,
|
||||
c.approve_status,
|
||||
@ -145,7 +144,6 @@
|
||||
FROM
|
||||
cosco_supplier_change_apply c
|
||||
LEFT JOIN cosco_supplier_base sb ON c.supplier_id = sb.id
|
||||
left join dict_project dp on sb.enterprise_type = dp.`code` and dp.parent_code = 'enterprise_type'
|
||||
left join (
|
||||
SELECT
|
||||
cas.supplier_id,
|
||||
|
@ -29,7 +29,6 @@
|
||||
csi.id,
|
||||
supplier_id,
|
||||
taxpayer_type,
|
||||
dp.dic_name as taxpayer_type_cn,
|
||||
taxpayer_code,
|
||||
phone,
|
||||
account,
|
||||
@ -45,7 +44,6 @@
|
||||
last_update_time
|
||||
FROM
|
||||
cosco_supplier_invoice csi
|
||||
left join dict_project dp on csi.taxpayer_type = dp.`code` and dp.parent_code = 'taxpayer_type'
|
||||
</sql>
|
||||
|
||||
|
||||
|
@ -56,11 +56,9 @@
|
||||
<select id="selectCoscoSupplierUserCategoryByCoscoSupplierUserId" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierUserCategory" resultMap="CoscoSupplierUserCategoryResult">
|
||||
SELECT
|
||||
csuc.supplier_user_id,
|
||||
csuc.category_id,
|
||||
cc.category_name
|
||||
csuc.category_id
|
||||
FROM
|
||||
cosco_supplier_user_category csuc
|
||||
left join cosco_category cc on csuc.category_id = cc.id and cc.del_flag = 'normal'
|
||||
where supplier_user_id = #{supplierUserId}
|
||||
</select>
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
CASE
|
||||
WHEN s.supplier_type = 'ovs' THEN
|
||||
name_en ELSE name END AS supplierName,
|
||||
ca.category_name as categoryName,
|
||||
sc.supplierexit_id,
|
||||
sc.supplier_id,
|
||||
sc.category_id
|
||||
@ -29,7 +28,6 @@
|
||||
cosco_supplierexit_supplier_category sc
|
||||
left join cosco_supplierexit e on sc.supplierexit_id = e.id
|
||||
left join cosco_supplier_base s on sc.supplier_id = s.id and s.del_flag = 'normal'
|
||||
left join cosco_category ca on sc.category_id = ca.id and ca.del_flag = 'normal'
|
||||
</sql>
|
||||
|
||||
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierexitSupplierCategory" resultMap="CoscoSupplierexitSupplierCategoryResult">
|
||||
|
Reference in New Issue
Block a user