Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
6be9e8ac
Commit
6be9e8ac
authored
Feb 05, 2026
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.7.20-瓜子新需求
parent
40c180cd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
10 deletions
+82
-10
TGzAreaExportVo.java
.../yifu/cloud/plus/v1/yifu/archives/vo/TGzAreaExportVo.java
+75
-0
TGzAreaMapper.java
...ifu/cloud/plus/v1/yifu/archives/mapper/TGzAreaMapper.java
+2
-1
TGzAreaServiceImpl.java
...lus/v1/yifu/archives/service/impl/TGzAreaServiceImpl.java
+4
-8
TGzAreaMapper.xml
...-archives-biz/src/main/resources/mapper/TGzAreaMapper.xml
+1
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TGzAreaExportVo.java
0 → 100644
View file @
6be9e8ac
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* 瓜子特殊字典导出Vo
*
* @author hgw
* @date 2026-02-05 14:16:10
*/
@Data
@ColumnWidth
(
25
)
public
class
TGzAreaExportVo
{
/**
* 皖信地址编码
*/
@ExcelAttribute
(
name
=
"皖信地址编码"
,
isNotEmpty
=
true
,
errorInfo
=
"皖信地址编码不能为空"
,
maxLength
=
11
)
@NotBlank
(
message
=
"皖信地址编码不能为空"
)
@Length
(
max
=
11
,
message
=
"皖信地址编码不能超过11个字符"
)
@ExcelProperty
(
"皖信地址编码"
)
@Schema
(
description
=
"皖信地址编码"
)
private
String
areaCode
;
/**
* 皖信地址
*/
@ExcelAttribute
(
name
=
"皖信地址"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"皖信地址不能超过50个字符"
)
@ExcelProperty
(
"皖信地址"
)
@Schema
(
description
=
"皖信地址"
)
private
String
areaName
;
/**
* 瓜子地址编码
*/
@ExcelAttribute
(
name
=
"瓜子地址编码"
,
isNotEmpty
=
true
,
errorInfo
=
"瓜子地址编码不能为空"
,
maxLength
=
11
)
@NotBlank
(
message
=
"瓜子地址编码不能为空"
)
@Length
(
max
=
11
,
message
=
"瓜子地址编码不能超过11个字符"
)
@ExcelProperty
(
"瓜子地址编码"
)
@Schema
(
description
=
"瓜子地址编码"
)
private
String
gzCode
;
/**
* 瓜子城市名称
*/
@ExcelAttribute
(
name
=
"瓜子城市名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"瓜子城市名称不能超过50个字符"
)
@ExcelProperty
(
"瓜子城市名称"
)
@Schema
(
description
=
"瓜子城市名称"
)
private
String
gzName
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TGzAreaMapper.java
View file @
6be9e8ac
...
...
@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzArea
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzAreaExportVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzAreaSearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -48,6 +49,6 @@ public interface TGzAreaMapper extends BaseMapper<TGzArea> {
long
getTGzAreaCountByCode
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"id"
)
String
id
);
List
<
TGzArea
>
getTGzAreaExport
(
@Param
(
"tGzArea"
)
TGzAreaSearchVo
tGzArea
);
List
<
TGzArea
ExportVo
>
getTGzAreaExport
(
@Param
(
"tGzArea"
)
TGzAreaSearchVo
tGzArea
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TGzAreaServiceImpl.java
View file @
6be9e8ac
...
...
@@ -16,25 +16,20 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzArea
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TGzAreaMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzAreaService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzAreaExportVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzAreaSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
...
...
@@ -91,13 +86,14 @@ public class TGzAreaServiceImpl extends ServiceImpl<TGzAreaMapper, TGzArea> impl
/**
* 瓜子地址映射表批量导出
*
* @return
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TGzAreaSearchVo
searchVo
)
{
String
fileName
=
"瓜子地址映射表批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TGzArea
>
list
=
new
ArrayList
<>();
List
<
TGzArea
ExportVo
>
list
=
new
ArrayList
<>();
long
count
=
baseMapper
.
getTGzAreaExportCount
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
...
...
@@ -105,7 +101,7 @@ public class TGzAreaServiceImpl extends ServiceImpl<TGzAreaMapper, TGzArea> impl
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
,
TGzArea
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
,
TGzArea
ExportVo
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TGzAreaMapper.xml
View file @
6be9e8ac
...
...
@@ -133,7 +133,7 @@
</select>
<!-- 导出 -->
<select
id=
"getTGzAreaExport"
result
Map=
"tGzAreaMap
"
>
<select
id=
"getTGzAreaExport"
result
Type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TGzAreaExportVo
"
>
SELECT
a.AREA_CODE,
a.AREA_NAME,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment