修改导出语句

This commit is contained in:
YY
2025-08-06 08:25:51 +08:00
parent 0f3d61f8fa
commit 21b0e822c2
4 changed files with 37 additions and 27 deletions

View File

@ -209,22 +209,24 @@
</update> </update>
<select id="getSupplierAnnualReviewStatisticsList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierAnnualReviewStatisticsVo" <select id="getSupplierAnnualReviewStatisticsList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierAnnualReviewStatisticsVo"
resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierAnnualReviewStatisticsVo"> resultMap="annualReviewResultMap">
select select
csb.name supplierName, csb.name supplierName,
csb.id as supplierId,
case when csb.supplier_type = 'ovs' then '境外' case when csb.supplier_type = 'ovs' then '境外'
when csb.supplier_type = 'ovs' then '境内' when csb.supplier_type = 'ovs' then '境内'
else '境内' end as area , else '境内' end as area ,
csb.id, cats.id,
'准入单位' as accessUnit, '天津中远海运集装箱运输有限公司' as accessUnit,
'准入部门' as accessDept,
case when cats.review_result = 1 then '合格' case when cats.review_result = 1 then '合格'
else '不合格' end as annualStatisticsResult, else '不合格' end as annualStatisticsResult,
(select GROUP_CONCAT( DISTINCT casc.category_id SEPARATOR ', ' ) (select GROUP_CONCAT( DISTINCT casc.category_name SEPARATOR ', ' )
from cosco_access_supplier_category casc from cosco_access_supplier_category casc
where casc.del_flag = 'normal' and casc.supplier_id=csb.id) as categoryIds, where casc.del_flag = 'normal' and casc.supplier_id=csb.id) as categoryName,
cat.annualreview_year cat.annualreview_year,
'天津中远海运集装箱运输有限公司' as accessDept
from from
cosco_annualreview_task_supplier cats cosco_annualreview_task_supplier cats
join cosco_supplier_base csb on cats.supplier_id=csb.id join cosco_supplier_base csb on cats.supplier_id=csb.id

View File

@ -341,21 +341,23 @@
<select id="getSupplierEvaluateStatisticsList" <select id="getSupplierEvaluateStatisticsList"
resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierEvaluateStatisticsVo" resultMap="supplierEvaluationResultMap"
parameterType="map"> parameterType="map">
select select
csb.name supplierName, csb.name supplierName,
case when csb.supplier_type = 'ovs' then '境外' case when csb.supplier_type = 'ovs' then '境外'
when csb.supplier_type = 'ovs' then '境内' when csb.supplier_type = 'ovs' then '境内'
else '境内' end as area , else '境内' end as area ,
cets.id, csb.id,
(select GROUP_CONCAT( DISTINCT casc.category_id SEPARATOR ', ' ) (select GROUP_CONCAT( DISTINCT casc.category_name SEPARATOR ', ' )
from cosco_access_supplier_category casc from cosco_access_supplier_category casc
where casc.del_flag = 'normal' and casc.supplier_id=csb.id) as categoryIds, where casc.del_flag = 'normal' and casc.supplier_id=csb.id) as categoryName,
'准入单位' as accessUnit, '天津中远海运集装箱运输有限公司' as accessUnit,
'准入部门' as accessDept,
cet.evaluate_year,
cets.review_result evaluateResult, cets.review_result evaluateResult,
cet.evaluate_year evaluateYear '天津中远海运集装箱运输有限公司' as accessDept
from from
cosco_evaluate_task_supplier cets cosco_evaluate_task_supplier cets
join cosco_supplier_base csb on cets.supplier_id=csb.id join cosco_supplier_base csb on cets.supplier_id=csb.id

View File

@ -219,11 +219,15 @@
</foreach> </foreach>
</update> </update>
<select id="getSupplierQualificationExpireList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo"> <select id="getSupplierQualificationExpireList"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo"
resultMap="supplierQualificationsResultMap">
SELECT SELECT
csq.name as qualificationsName,
csq.authority, csq.authority,
csq.term_of_validity, csq.term_of_validity,
csb.NAME supplierName, csb.NAME supplierName,
csb.id as supplierId,
CASE CASE
WHEN csb.supplier_type = 'ovs' THEN WHEN csb.supplier_type = 'ovs' THEN
@ -231,19 +235,18 @@
WHEN csb.supplier_type = 'ovs' THEN WHEN csb.supplier_type = 'ovs' THEN
'境内' ELSE '境内' '境内' ELSE '境内'
END AS area, END AS area,
csb.id, csq.id,
'准入单位' AS accessUnit,
'准入部门' AS accessDept,
( (
SELECT SELECT
GROUP_CONCAT( DISTINCT cc.category_name SEPARATOR ', ' ) GROUP_CONCAT( DISTINCT casc.category_name SEPARATOR ', ' )
FROM FROM
cosco_access_supplier_category casc cosco_access_supplier_category casc
JOIN cosco_category cc ON cc.id = casc.category_id
WHERE WHERE
casc.del_flag = 'normal' casc.del_flag = 'normal'
AND casc.supplier_id = csb.id AND casc.supplier_id = csb.id
) AS categoryName ) AS category,
'天津中远海运集装箱运输有限公司' AS accessUnit,
'天津中远海运集装箱运输有限公司' AS accessDept
FROM FROM
cosco_supplier_qualifications csq cosco_supplier_qualifications csq
JOIN cosco_supplier_base csb ON csq.supplier_id = csb.id JOIN cosco_supplier_base csb ON csq.supplier_id = csb.id

View File

@ -213,19 +213,22 @@
</update> </update>
<select id="getSupplierExitStatisticsList" <select id="getSupplierExitStatisticsList"
resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo" resultMap="supplierExitResultMap"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo"> parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo">
select select
csb.name supplierName, csb.name supplierName,
csb.id as supplierId,
case when csb.supplier_type = 'ovs' then '境外' case when csb.supplier_type = 'ovs' then '境外'
when csb.supplier_type = 'ovs' then '境内' when csb.supplier_type = 'ovs' then '境内'
else '境内' end as area , else '境内' end as area ,
csb.id, cse.id,
'退出单位' as accessUnit, '天津中远海运集装箱运输有限公司' as accessUnit,
'退出部门' as accessDept, '天津中远海运集装箱运输有限公司' as accessDept,
cse.create_by as applyUser, cse.create_by as applyUser,
cse.update_time as applyTime, (select GROUP_CONCAT( DISTINCT cssc.category_name SEPARATOR ', ' )
(select GROUP_CONCAT( DISTINCT cc.category_name SEPARATOR ', ' ) from cosco_supplierexit_supplier_category cssc
where cssc.supplier_id=csb.id and cssc.supplierexit_id=cse.id) as category,
cse.update_time as applyTime
from cosco_supplierexit_supplier_category cssc from cosco_supplierexit_supplier_category cssc
join cosco_category cc join cosco_category cc
ON cc.id = cssc.category_id ON cc.id = cssc.category_id