Merge branch 'dev' of http://10.0.0.126:8500/liushimin/biz_supplier_manage into dev
This commit is contained in:
@ -896,8 +896,9 @@
|
||||
resultType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.vo.SupplierPageVo">
|
||||
SELECT
|
||||
csb.id,
|
||||
csb.supplier_type as supplierType,
|
||||
MAX(csb.name) AS name,
|
||||
csb.social_credit_code AS socialCreditCode,
|
||||
MAX(csb.social_credit_code) AS socialCreditCode,
|
||||
MAX(cas.dept_id) AS deptId,
|
||||
MAX(caw.id) AS accessWorkId,
|
||||
MAX(caw.update_time) AS admissionTime,
|
||||
@ -941,6 +942,7 @@
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
casc.supplier_id,
|
||||
GROUP_CONCAT(casc.category_id SEPARATOR ', ') AS categoryId,
|
||||
GROUP_CONCAT(cc.category_name SEPARATOR ', ') AS categoryName
|
||||
FROM
|
||||
cosco_access_supplier_category casc
|
||||
@ -987,6 +989,16 @@
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
<if test="vo.name!=null and vo.name!=''">
|
||||
and csb.name like concat('%',#{vo.name},'%')
|
||||
</if>
|
||||
<if test="vo.deptId!=null and vo.deptId!=''">
|
||||
and cas.dept_id = #{vo.deptId}
|
||||
</if>
|
||||
<if test="vo.categoryId!=null and vo.categoryId!=''">
|
||||
and category_info.categoryId like concat('%',#{vo.categoryId},'%')
|
||||
</if>
|
||||
|
||||
|
||||
GROUP BY
|
||||
csb.id
|
||||
|
@ -221,7 +221,8 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
<select id="getSupplierExitStatistics" parameterType="map" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo">
|
||||
|
||||
<select id="getSupplierQualificationExpireList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo">
|
||||
SELECT
|
||||
csq.authority,
|
||||
csq.term_of_validity,
|
||||
@ -251,6 +252,44 @@
|
||||
JOIN cosco_supplier_base csb ON csq.supplier_id = csb.id
|
||||
WHERE
|
||||
csq.del_flag = 'normal'
|
||||
AND ( csq.term_of_validity < CURDATE() OR csq.term_of_validity
|
||||
BETWEEN CURDATE() AND DATE_ADD( CURDATE(), INTERVAL 30 DAY ) )
|
||||
<if test="supplierName!=null and supplierName!=''">
|
||||
and csb.name like concat('%',#{supplierName},'%')
|
||||
</if>
|
||||
ORDER BY
|
||||
csq.term_of_validity ASC
|
||||
</select>
|
||||
<select id="getSupplierExitStatistics" parameterType="map" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo">
|
||||
SELECT
|
||||
csq.authority,
|
||||
csq.term_of_validity,
|
||||
csb.NAME supplierName,
|
||||
CASE
|
||||
|
||||
WHEN csb.supplier_type = 'ovs' THEN
|
||||
'境外'
|
||||
WHEN csb.supplier_type = 'ovs' THEN
|
||||
'境内' ELSE '境内'
|
||||
END AS area,
|
||||
csq.id,
|
||||
'准入单位' AS accessUnit,
|
||||
'准入部门' AS accessDept,
|
||||
(
|
||||
SELECT
|
||||
GROUP_CONCAT( DISTINCT cc.category_name SEPARATOR ', ' )
|
||||
FROM
|
||||
cosco_access_supplier_category casc
|
||||
JOIN cosco_category cc ON cc.id = casc.category_id
|
||||
WHERE
|
||||
casc.del_flag = 'normal'
|
||||
AND casc.supplier_id = csb.id
|
||||
) AS categoryName
|
||||
FROM
|
||||
cosco_supplier_qualifications csq
|
||||
JOIN cosco_supplier_base csb ON csq.supplier_id = csb.id
|
||||
WHERE
|
||||
csq.del_flag = 'normal'
|
||||
AND ( csq.term_of_validity < CURDATE() OR csq.term_of_validity
|
||||
BETWEEN CURDATE() AND DATE_ADD( CURDATE(), INTERVAL 30 DAY ) )
|
||||
<if test="vo.supplierName!=null and vo.supplierName!=''">
|
||||
|
@ -197,13 +197,41 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getSupplierExitStatisticsList"
|
||||
resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo"
|
||||
parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo">
|
||||
select
|
||||
csb.name supplierName,
|
||||
case when csb.supplier_type = 'ovs' then '境外'
|
||||
when csb.supplier_type = 'ovs' then '境内'
|
||||
else '境内' end as area ,
|
||||
csb.id,
|
||||
'退出单位' as accessUnit,
|
||||
'退出部门' as accessDept,
|
||||
cse.create_by as applyUser,
|
||||
cse.update_time as applyTime,
|
||||
(select GROUP_CONCAT( DISTINCT cc.category_name SEPARATOR ', ' )
|
||||
from cosco_supplierexit_supplier_category cssc
|
||||
join cosco_category cc
|
||||
ON cc.id = cssc.category_id
|
||||
where cssc.supplier_id=csb.id and cssc.supplierexit_id=cse.id) as categoryName
|
||||
from cosco_supplierexit cse
|
||||
join cosco_supplierexit_supplier css
|
||||
on cse.id= css.supplierexit_id
|
||||
join cosco_supplier_base csb on csb.id=css.supplier_id
|
||||
where cse.approve_status=1
|
||||
<if test="supplierName!=null and supplierName!=''">
|
||||
and csb.name like concat('%',#{supplierName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getSupplierExitStatistics" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo" parameterType="map">
|
||||
select
|
||||
csb.name supplierName,
|
||||
case when csb.supplier_type = 'ovs' then '境外'
|
||||
when csb.supplier_type = 'ovs' then '境内'
|
||||
else '境内' end as area ,
|
||||
csb.id,
|
||||
cse.id,
|
||||
'退出单位' as accessUnit,
|
||||
'退出部门' as accessDept,
|
||||
cse.create_by as applyUser,
|
||||
|
Reference in New Issue
Block a user