代码优化

This commit is contained in:
TL
2025-07-15 13:36:10 +08:00
parent adfb1e5185
commit 36a014b022
8 changed files with 33 additions and 11 deletions

View File

@ -135,7 +135,9 @@
<select id="selectExitCategoryList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" resultMap="CoscoAccessSupplierCategoryResult">
SELECT
s.`name` as supplierName,
CASE
WHEN s.supplier_type = 'ovs' THEN
name_en ELSE name END AS supplierName,
ca.category_name as categoryName,
es.review_result as reviewResult,
es.evaTime,
@ -143,6 +145,7 @@
c.access_work_id,
c.supplier_id,
c.category_id,
c.dept_id,
c.del_flag,
c.create_by,
c.create_time,

View File

@ -34,7 +34,9 @@
<sql id="selectCoscoAccessSupplierVo">
SELECT
a.id,
s.`name` AS supplierName,
CASE
WHEN s.supplier_type = 'ovs' THEN name_en
ELSE name END AS supplierName,
a.access_work_id,
a.supplier_id,
a.dept_id

View File

@ -186,6 +186,7 @@
<sql id="selecWzrListVo">
SELECT
csb.id,
csb.supplier_type,
CASE
WHEN csb.supplier_type = 'dvs' THEN social_credit_code
WHEN csb.supplier_type = 'ovs' THEN vat
@ -821,8 +822,14 @@
select
csb.id,
csb.name,
csb.name_en as nameEn,
csb.supplier_type AS supplierType,
csb.social_credit_code AS socialCreditCode,
CASE
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 unifiedCode,
GROUP_CONCAT(caw.dept_id) as dept_id,
max(caw.update_time) AS admissionTime,
max(ets.update_time) AS evaluationTime ,
@ -872,6 +879,9 @@
<if test="vo.name!=null and vo.name!=''">
and csb.name like concat('%',#{vo.name},'%')
</if>
<if test="vo.supplierType!=null and vo.supplierType!=''">
and csb.supplier_type = #{vo.supplierType}
</if>
<if test="vo.deptId!=null and vo.deptId!=''">
and cas.dept_id = #{vo.deptId}
</if>

View File

@ -18,7 +18,9 @@
e.exit_theme,
e.dept_id,
e.create_time,
s.`name` as supplierName,
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,