导出修改
This commit is contained in:
@ -50,10 +50,15 @@ public class DataStatisticeController {
|
||||
try {
|
||||
List<SupplierEvaluateStatisticsVo> list = dataStatisticeService.getSupplierEvaluateStatisticsList(vo);
|
||||
String fileName = URLEncoder.encode("供应评价.xlsx", "UTF-8");
|
||||
Set<String> includeFields = new HashSet<>(Arrays.asList(
|
||||
"supplierName","area", "categoryName","evaluateYear","evaluateResult"
|
||||
// 指定要导出的字段名
|
||||
));
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
|
||||
response.setCharacterEncoding("utf-8");
|
||||
EasyExcelFactory.write(response.getOutputStream(), CoscoEvaluateTaskSupplier.class)
|
||||
EasyExcelFactory.write(response.getOutputStream(), SupplierEvaluateStatisticsVo.class)
|
||||
.includeColumnFieldNames(includeFields)
|
||||
.sheet("供应评价")
|
||||
.doWrite(list);
|
||||
} catch (Exception e) {
|
||||
@ -84,11 +89,15 @@ public class DataStatisticeController {
|
||||
List<SupplierAnnualReviewStatisticsVo> list = dataStatisticeService.getSupplierAnnualReviewStatisticsList(vo);
|
||||
String fileName = URLEncoder.encode("供应年审.xlsx", "UTF-8");
|
||||
// 动态设置导出字段(忽略未标注字段)
|
||||
|
||||
Set<String> includeFields = new HashSet<>(Arrays.asList(
|
||||
"supplierName","area", "categoryName","annualreviewYear","annualStatisticsResult"
|
||||
// 指定要导出的字段名
|
||||
));
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
|
||||
response.setCharacterEncoding("utf-8");
|
||||
EasyExcelFactory.write(response.getOutputStream(), CoscoEvaluateTaskSupplier.class)
|
||||
EasyExcelFactory.write(response.getOutputStream(), SupplierAnnualReviewStatisticsVo.class)
|
||||
.includeColumnFieldNames(includeFields)
|
||||
.sheet("供应年审")
|
||||
.doWrite(list);
|
||||
} catch (Exception e) {
|
||||
@ -120,11 +129,14 @@ public class DataStatisticeController {
|
||||
List<SupplierExitStatisticsVo> list = dataStatisticeService.getSupplierExitStatisticsList(vo);
|
||||
String fileName = URLEncoder.encode("供应商退出信息.xlsx", "UTF-8");
|
||||
// 动态设置导出字段(忽略未标注字段)
|
||||
|
||||
Set<String> includeFields = new HashSet<>(Arrays.asList(
|
||||
"supplierName","area", "categoryName","accessUnit","accessDept","applyUser" // 指定要导出的字段名
|
||||
));
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
|
||||
response.setCharacterEncoding("utf-8");
|
||||
EasyExcelFactory.write(response.getOutputStream(), CoscoEvaluateTaskSupplier.class)
|
||||
EasyExcelFactory.write(response.getOutputStream(), SupplierExitStatisticsVo.class)
|
||||
.includeColumnFieldNames(includeFields)
|
||||
.sheet("供应商退出信息")
|
||||
.doWrite(list);
|
||||
} catch (Exception e) {
|
||||
@ -154,11 +166,15 @@ public class DataStatisticeController {
|
||||
List<SupplierQualificationExpireVo> list = dataStatisticeService.getSupplierQualificationExpireList(vo);
|
||||
String fileName = URLEncoder.encode("供应商资质.xlsx", "UTF-8");
|
||||
// 动态设置导出字段(忽略未标注字段)
|
||||
|
||||
Set<String> includeFields = new HashSet<>(Arrays.asList(
|
||||
"supplierName","area", "categoryName","accessUnit","accessDept","qualificationsName"
|
||||
,"termOfValidity"// 指定要导出的字段名
|
||||
));
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
|
||||
response.setCharacterEncoding("utf-8");
|
||||
EasyExcelFactory.write(response.getOutputStream(), CoscoEvaluateTaskSupplier.class)
|
||||
EasyExcelFactory.write(response.getOutputStream(), SupplierQualificationExpireVo.class)
|
||||
.includeColumnFieldNames(includeFields)
|
||||
.sheet("供应商资质")
|
||||
.doWrite(list);
|
||||
} catch (Exception e) {
|
||||
|
@ -37,18 +37,18 @@ public class SupplierAnnualReviewStatisticsVo {
|
||||
/**
|
||||
* 准入单位
|
||||
*/
|
||||
@ExcelProperty("准入单位")
|
||||
|
||||
private String accessUnit="天津中远海运集装箱运输有限公司";
|
||||
/**
|
||||
* 准入部门
|
||||
*/
|
||||
@ExcelProperty("准入部门")
|
||||
|
||||
private String accessDept="天津中远海运集装箱运输有限公司";
|
||||
/**
|
||||
* 评价年度
|
||||
*/
|
||||
@ExcelProperty("评价年度")
|
||||
private String annualreviewYear="2025";
|
||||
private String annualreviewYear;
|
||||
|
||||
private String supplierId;
|
||||
|
||||
|
@ -33,12 +33,10 @@ public class SupplierEvaluateStatisticsVo {
|
||||
/**
|
||||
* 准入单位
|
||||
*/
|
||||
@ExcelProperty("准入单位")
|
||||
private String accessUnit="天津中远海运集装箱运输有限公司";
|
||||
/**
|
||||
* 准入部门
|
||||
*/
|
||||
@ExcelProperty("准入部门")
|
||||
private String accessDept="天津中远海运集装箱运输有限公司";
|
||||
/**
|
||||
* 评价年度
|
||||
|
@ -17,14 +17,10 @@ public class SupplierQualificationExpireVo {
|
||||
/**
|
||||
* 发证机构
|
||||
*/
|
||||
@ExcelProperty("发证机构")
|
||||
|
||||
private String authority;
|
||||
|
||||
/**
|
||||
* 有效期截止日
|
||||
*/
|
||||
@ExcelProperty("有效期截止日")
|
||||
private Date termOfValidity;
|
||||
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
@ -74,8 +70,13 @@ public class SupplierQualificationExpireVo {
|
||||
/**
|
||||
* 资质名称
|
||||
*/
|
||||
@ExcelProperty("资质名称")
|
||||
private String qualificationsName;
|
||||
|
||||
/**
|
||||
* 有效期截止日
|
||||
*/
|
||||
@ExcelProperty("资质到期时间")
|
||||
private Date termOfValidity;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
|
@ -239,8 +239,8 @@
|
||||
<if test="annualreviewYear!=null and annualreviewYear!=''">
|
||||
and cat.annualreview_year = #{annualreviewYear}
|
||||
</if>
|
||||
<if test="vo.orgId!=null and vo.orgId!=''">
|
||||
and cat.org_id = #{vo.orgId}
|
||||
<if test="orgId!=null and orgId!=''">
|
||||
and cat.org_id = #{orgId}
|
||||
</if>
|
||||
and review_result is not null
|
||||
</where>
|
||||
|
@ -374,8 +374,8 @@
|
||||
<if test="evaluateResult!=null and evaluateResult!=''">
|
||||
and cets.review_result = #{evaluateResult}
|
||||
</if>
|
||||
<if test="vo.orgId!=null and vo.orgId!=''">
|
||||
and cet.org_id = #{vo.orgId}
|
||||
<if test="orgId!=null and orgId!=''">
|
||||
and cet.org_id = #{orgId}
|
||||
</if>
|
||||
</where>
|
||||
order by cets.create_time desc
|
||||
|
@ -243,8 +243,8 @@
|
||||
WHERE
|
||||
casc.del_flag = 'normal'
|
||||
AND casc.supplier_id = csb.id
|
||||
<if test="vo.orgId!=null and vo.orgId!=''">
|
||||
and casc.org_id=#{vo.orgId}
|
||||
<if test="orgId!=null and orgId!=''">
|
||||
and casc.org_id=#{orgId}
|
||||
</if>
|
||||
) AS category,
|
||||
caw.dept_id ,
|
||||
@ -265,6 +265,9 @@
|
||||
<if test="supplierName!=null and supplierName!=''">
|
||||
and csb.name like concat('%',#{supplierName},'%')
|
||||
</if>
|
||||
<if test="orgId!=null and orgId!=''">
|
||||
and caw.org_id=#{orgId}
|
||||
</if>
|
||||
ORDER BY
|
||||
csq.term_of_validity ASC
|
||||
</select>
|
||||
|
@ -216,33 +216,27 @@
|
||||
resultMap="supplierExitResultMap"
|
||||
parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo">
|
||||
select
|
||||
csb.name supplierName,
|
||||
csb.name as supplierName,
|
||||
csb.id as supplierId,
|
||||
case when csb.supplier_type = 'ovs' then '境外'
|
||||
when csb.supplier_type = 'ovs' then '境内'
|
||||
else '境内' end as area ,
|
||||
else '境内' end as area,
|
||||
cse.id,
|
||||
'天津中远海运集装箱运输有限公司' as accessUnit,
|
||||
'天津中远海运集装箱运输有限公司' as accessDept,
|
||||
cse.create_by as applyUser,
|
||||
(select GROUP_CONCAT( DISTINCT cssc.category_name SEPARATOR ', ' )
|
||||
|
||||
cse.update_time as applyTime,
|
||||
(select IFNULL(GROUP_CONCAT(DISTINCT cssc.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
|
||||
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
|
||||
where cssc.supplier_id=csb.id and cssc.supplierexit_id=cse.id) as category,
|
||||
'1' as accessUnit
|
||||
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>
|
||||
<if test="vo.orgId!=null and vo.orgId!=''">
|
||||
and cse.org_id = #{vo.orgId}
|
||||
<if test="orgId!=null and orgId!=''">
|
||||
and cse.org_id = #{orgId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
@ -259,25 +253,22 @@
|
||||
</resultMap>
|
||||
<select id="getSupplierExitStatistics" resultMap="supplierExitResultMap" parameterType="map">
|
||||
select
|
||||
csb.name supplierName,
|
||||
csb.id as supplierId,
|
||||
case when csb.supplier_type = 'ovs' then '境外'
|
||||
when csb.supplier_type = 'ovs' then '境内'
|
||||
else '境内' end as area ,
|
||||
csb.name as supplierName,
|
||||
csb.id as supplierId,
|
||||
case when csb.supplier_type = 'ovs' then '境外'
|
||||
else '境内' end as area,
|
||||
cse.id,
|
||||
'天津中远海运集装箱运输有限公司' as accessUnit,
|
||||
'天津中远海运集装箱运输有限公司' as accessDept,
|
||||
cse.create_by as applyUser,
|
||||
(select GROUP_CONCAT( DISTINCT cssc.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
|
||||
cse.create_by as applyUser,
|
||||
|
||||
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
|
||||
cse.update_time as applyTime,
|
||||
(select IFNULL(GROUP_CONCAT(DISTINCT cssc.category_name SEPARATOR ', '), '')
|
||||
from cosco_supplierexit_supplier_category cssc
|
||||
where cssc.supplier_id=csb.id and cssc.supplierexit_id=cse.id) as category,
|
||||
'1' as accessUnit
|
||||
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="vo.supplierName!=null and vo.supplierName!=''">
|
||||
and csb.name like concat('%',#{vo.supplierName},'%')
|
||||
</if>
|
||||
|
Reference in New Issue
Block a user