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
1f512df4
Commit
1f512df4
authored
Jun 18, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.12' into MVP1.7.12
parents
23e658ce
8da05fc2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
556 additions
and
77 deletions
+556
-77
TGzEmpInfoExportMain.java
.../cloud/plus/v1/yifu/archives/vo/TGzEmpInfoExportMain.java
+300
-0
TGzOfferInfoExportDetailVo.java
.../plus/v1/yifu/archives/vo/TGzOfferInfoExportDetailVo.java
+2
-0
TGzOfferInfoExportMainVo.java
...ud/plus/v1/yifu/archives/vo/TGzOfferInfoExportMainVo.java
+2
-2
TGzEmpInfoController.java
...lus/v1/yifu/archives/controller/TGzEmpInfoController.java
+7
-6
TGzEmpInfoMapper.java
.../cloud/plus/v1/yifu/archives/mapper/TGzEmpInfoMapper.java
+21
-0
TGzEmpInfoServiceImpl.java
.../v1/yifu/archives/service/impl/TGzEmpInfoServiceImpl.java
+43
-17
TGzOfferInfoServiceImpl.java
...1/yifu/archives/service/impl/TGzOfferInfoServiceImpl.java
+8
-50
TGzEmpInfoMapper.xml
...chives-biz/src/main/resources/mapper/TGzEmpInfoMapper.xml
+103
-0
TGzOfferInfoMapper.xml
...ives-biz/src/main/resources/mapper/TGzOfferInfoMapper.xml
+1
-2
ExcelAttributeConstants.java
...v1/yifu/common/core/constant/ExcelAttributeConstants.java
+22
-0
ExcelUtil.java
...m/yifu/cloud/plus/v1/yifu/common/core/util/ExcelUtil.java
+47
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TGzEmpInfoExportMain.java
0 → 100644
View file @
1f512df4
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TGzOfferInfoExportDetailVo.java
View file @
1f512df4
...
...
@@ -18,6 +18,7 @@
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
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
import
lombok.Data
;
...
...
@@ -32,6 +33,7 @@ import java.math.BigDecimal;
* @date 2025-6-17 09:38:47
*/
@Data
@ColumnWidth
(
15
)
public
class
TGzOfferInfoExportDetailVo
implements
Serializable
{
@ExcelProperty
(
"流程ID"
)
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TGzOfferInfoExportMainVo.java
View file @
1f512df4
...
...
@@ -18,12 +18,11 @@
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
com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 导出-瓜子offer信息接收表
...
...
@@ -32,6 +31,7 @@ import java.util.Date;
* @date 2025-6-17 09:38:47
*/
@Data
@ColumnWidth
(
25
)
public
class
TGzOfferInfoExportMainVo
implements
Serializable
{
@ExcelProperty
(
"流程ID"
)
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TGzEmpInfoController.java
View file @
1f512df4
...
...
@@ -146,13 +146,14 @@ public class TGzEmpInfoController {
/**
* 瓜子档案表 批量导出
*
* @Description: 瓜子档案表 批量导出
* @Author: hgw
* @Date: 2025/6/18 17:24
* @return: void
**/
@Operation
(
description
=
"导出瓜子档案表 hasPermission('archives_tgzempinfo-export')"
)
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('archives_tgzempinfo-export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TGzEmpInfoSearchVo
searchVo
)
{
@Operation
(
description
=
"导出瓜子档案表 "
)
@PostMapping
(
"/exportGzEmpInfo"
)
public
void
exportGzEmpInfo
(
HttpServletResponse
response
,
@RequestBody
TGzEmpInfoSearchVo
searchVo
)
{
tGzEmpInfoService
.
listExport
(
response
,
searchVo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TGzEmpInfoMapper.java
View file @
1f512df4
...
...
@@ -21,10 +21,15 @@ 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.TGzEmpInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoExportMain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoExportSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoSearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 瓜子档案表
*
...
...
@@ -40,4 +45,20 @@ public interface TGzEmpInfoMapper extends BaseMapper<TGzEmpInfo> {
* @return
*/
IPage
<
TGzEmpInfo
>
getTGzEmpInfoPage
(
Page
<
TGzEmpInfo
>
page
,
@Param
(
"tGzEmpInfo"
)
TGzEmpInfoSearchVo
tGzEmpInfo
);
/**
* @Description: 导出前先查条数
* @Author: hgw
* @Date: 2025/6/18 15:11
* @return: int
**/
int
getTGzEmpInfoCount
(
@Param
(
"tGzEmpInfo"
)
TGzEmpInfoSearchVo
tGzEmpInfo
);
/**
* @Description: 导出主表数据
* @Author: hgw
* @Date: 2025/6/18 15:12
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpInfo>
**/
List
<
TGzEmpInfoExportMain
>
getTGzEmpInfoList
(
@Param
(
"tGzEmpInfo"
)
TGzEmpInfoSearchVo
tGzEmpInfo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TGzEmpInfoServiceImpl.java
View file @
1f512df4
...
...
@@ -17,16 +17,28 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaMap
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TAttaInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzEmpInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.util.IdCardUtil
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoExportMain
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoExportDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzOfferInfoExportMainVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSalaryProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Service
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
...
@@ -34,6 +46,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoSearchVo;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.HashMap
;
import
java.net.URL
;
import
java.util.List
;
...
...
@@ -58,6 +71,7 @@ import javax.servlet.ServletOutputStream;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.Map
;
/**
* 瓜子档案表
...
...
@@ -68,6 +82,7 @@ import java.util.ArrayList;
@Log4j2
@Service
@RequiredArgsConstructor
@EnableConfigurationProperties
(
DaprUpmsProperties
.
class
)
public
class
TGzEmpInfoServiceImpl
extends
ServiceImpl
<
TGzEmpInfoMapper
,
TGzEmpInfo
>
implements
TGzEmpInfoService
{
private
final
TGzOfferInfoService
gzOfferInfoService
;
...
...
@@ -84,6 +99,9 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
private
final
TAttaInfoService
attaInfoService
;
// 拿区域
private
final
DaprUpmsProperties
daprUpmsProperties
;
@Autowired
private
OSSUtil
ossUtil
;
...
...
@@ -217,44 +235,52 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TGzEmpInfoSearchVo
searchVo
)
{
String
fileName
=
"瓜子档案表批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
prfName
=
"瓜子员工档案信息"
;
String
fileName
=
prfName
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TGzEmpInfo
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
List
<
TGzEmpInfoExportMain
>
list
=
new
ArrayList
<>();
long
count
=
baseMapper
.
getTGzEmpInfoCount
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TGzEmpInfo
.
class
).
build
();
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
Map
<
String
,
String
>
idLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_VALUE_ALL
);
if
(
Common
.
isEmpty
(
idLabelMap
)
||
idLabelMap
.
isEmpty
())
{
R
<
AreaMap
>
areaListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/area/inner/getAreaMapAll"
,
""
,
AreaMap
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isNotNull
(
areaListR
))
{
idLabelMap
=
areaListR
.
getData
().
getIdLabelMap
();
}
}
if
(
redisLabelMap
!=
null
&&
idLabelMap
!=
null
)
{
redisLabelMap
.
putAll
(
idLabelMap
);
}
Map
<
String
,
String
>
nameAndDicTypeMap
=
new
HashMap
<>();
ExcelUtil
.
getDictMapAndExp
(
TGzEmpInfoExportMain
.
class
,
nameAndDicTypeMap
,
redisLabelMap
);
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
,
TGzEmpInfoExportMain
.
class
).
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
)).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
WriteSheet
writeSheet
;
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
){
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TGzEmpInfo
>
util
=
new
ExcelUtil
<>(
TGzEmpInfo
.
class
);
for
(
TGzEmpInfo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
list
=
baseMapper
.
getTGzEmpInfoList
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"瓜子档案表"
+
index
).
build
();
writeSheet
=
EasyExcelFactory
.
writerSheet
(
prfName
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"瓜子档案表"
+
index
).
build
();
WriteSheet
writeSheet
=
EasyExcel
Factory
.
writerSheet
(
prfName
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
))
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TGzOfferInfoServiceImpl.java
View file @
1f512df4
...
...
@@ -578,23 +578,19 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
Map
<
String
,
String
>
nameAndDicTypeMap
=
getConverterDicTypeAndArea
(
TGzOfferInfoExportMainVo
.
class
,
redisLabelMap
);
Map
<
String
,
String
>
nameAndDicTypeMap
=
new
HashMap
<>();
ExcelUtil
.
getDictMapAndExp
(
TGzOfferInfoExportMainVo
.
class
,
nameAndDicTypeMap
,
redisLabelMap
);
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
,
TGzOfferInfoExportMainVo
.
class
).
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
)).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
){
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTGzOfferMainList
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TGzOfferInfoExportMainVo
>
util
=
new
ExcelUtil
<>(
TGzOfferInfoExportMainVo
.
class
);
for
(
TGzOfferInfoExportMainVo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcelFactory
.
writerSheet
(
prfName
+
index
).
build
();
writeSheet
=
EasyExcelFactory
.
writerSheet
(
prfName
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
@@ -646,17 +642,19 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这是获取所有字典的值
Map
<
String
,
String
>
redisLabelMap
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
REDIS_DICT_LABLE
);
Map
<
String
,
String
>
nameAndDicTypeMap
=
getConverterDicTypeAndArea
(
TGzOfferInfoExportDetailVo
.
class
,
redisLabelMap
);
Map
<
String
,
String
>
nameAndDicTypeMap
=
new
HashMap
<>();
ExcelUtil
.
getDictMapAndExp
(
TGzOfferInfoExportDetailVo
.
class
,
nameAndDicTypeMap
,
redisLabelMap
);
ExcelWriter
excelWriter
=
EasyExcelFactory
.
write
(
out
,
TGzOfferInfoExportDetailVo
.
class
).
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
)).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
){
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTGzOfferDetailList
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcelFactory
.
writerSheet
(
prfName
+
index
).
build
();
writeSheet
=
EasyExcelFactory
.
writerSheet
(
prfName
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
...
...
@@ -687,44 +685,4 @@ public class TGzOfferInfoServiceImpl extends ServiceImpl<TGzOfferInfoMapper, TGz
}
}
private
Map
<
String
,
String
>
getConverterDicTypeAndArea
(
Class
<?>
clazz
,
Map
<
String
,
String
>
redisLabelMap
)
{
// 得到所有定义字段
Field
[]
allFields
=
clazz
.
getDeclaredFields
();
Map
<
String
,
String
>
nameDicMap
=
new
HashMap
<>();
List
<
Field
>
fields
=
new
ArrayList
<>();
// 将需要字典表头存起来备用,如果没传,则全部翻译
for
(
Field
field
:
allFields
)
{
if
(
field
.
isAnnotationPresent
(
ExcelAttribute
.
class
))
{
fields
.
add
(
field
);
}
}
ExcelAttribute
attr
;
Field
field
;
String
[]
convertSource
;
String
[]
itemArray
;
for
(
int
j
=
0
;
j
<
fields
.
size
();
j
++)
{
field
=
fields
.
get
(
j
);
attr
=
field
.
getAnnotation
(
ExcelAttribute
.
class
);
if
(
Common
.
isNotNull
(
field
)
&&
Common
.
isNotNull
(
attr
)){
if
(
Common
.
isNotNull
(
attr
.
dataType
()))
{
nameDicMap
.
put
(
field
.
getName
(),
attr
.
dataType
());
}
else
if
(
Common
.
isNotNull
(
attr
.
isArea
())
&&
attr
.
isArea
())
{
nameDicMap
.
put
(
field
.
getName
(),
CacheConstants
.
AREA_VALUE_ALL
);
}
else
if
(
Common
.
isNotNull
(
attr
.
readConverterExp
()))
{
convertSource
=
attr
.
readConverterExp
().
split
(
","
);
if
(
Common
.
isNotNull
(
convertSource
))
{
for
(
String
item
:
convertSource
)
{
itemArray
=
item
.
split
(
"="
);
if
(
itemArray
.
length
>
1
)
{
redisLabelMap
.
put
(
field
.
getName
()+
CommonConstants
.
DOWN_LINE_STRING
+
itemArray
[
0
],
itemArray
[
1
]);
}
}
nameDicMap
.
put
(
field
.
getName
(),
field
.
getName
());
}
}
}
}
return
nameDicMap
;
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TGzEmpInfoMapper.xml
View file @
1f512df4
...
...
@@ -404,4 +404,107 @@
</where>
ORDER by a.create_time desc,a.id desc
</select>
<!--count-->
<select
id=
"getTGzEmpInfoCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_gz_emp_info a
<where>
a.del_flag = '0'
<include
refid=
"tGzEmpInfo_where"
/>
</where>
</select>
<!--导出-->
<select
id=
"getTGzEmpInfoList"
resultType=
"com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoExportMain"
>
SELECT
a.id,
a.biz_id,
a.offer_id,
a.emp_push_status,
a.contract_push_status,
a.contract_atta_push_status,
a.del_flag,
a.create_time,
a.create_by,
a.create_name,
a.update_by,
a.update_time,
a.name,
a.name_ac,
a.birthdate,
a.sex,
a.constel,
a.blood_type,
a.start_date,
a.country,
a.native_place,
a.ethnic_grp_cd,
a.mar_status,
a.political_sta,
a.insurance_sta,
a.driver_type,
a.driver_licen_exp,
a.national_id_type,
a.national_id,
a.persist_flag,
a.nid_start_date,
a.nid_expiry_date,
a.phone,
a.mail,
a.address_type,
a.state_id,
a.city_id,
a.county_id,
a.address,
a.sginature_method,
a.contract_num,
a.contract_type,
a.sginature_type,
a.probation,
a.sginature_dt,
a.contract_begin_dt,
a.contract_exp_end_dt,
a.contract_end_dt,
a.probation_dt,
a.prc_exp_dt,
a.nee_provider_id,
a.work_location,
a.contract_state,
a.hukou_type,
a.hukou_province,
a.hukou_city,
a.hukou_county,
a.hukou_detail,
a.account_type,
a.account_status,
a.account_country,
a.bank_cd,
a.cnaps_id,
a.bank_name,
a.account_province,
a.account_city,
a.account_ec_id,
a.account_name,
a.native_place_area_id,
a.state_area_id,
a.city_area_id,
a.county_area_id,
a.hukou_province_area_id,
a.hukou_city_area_id,
a.hukou_county_area_id,
a.account_province_area_id,
a.account_city_area_id
FROM t_gz_emp_info a
<where>
a.del_flag = '0'
<include
refid=
"tGzEmpInfo_where"
/>
</where>
ORDER by a.create_time desc,a.id desc
<if
test=
"tGzEmpInfo.limitStart != null"
>
limit #{tGzEmpInfo.limitStart},#{tGzEmpInfo.limitEnd}
</if>
</select>
</mapper>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TGzOfferInfoMapper.xml
View file @
1f512df4
...
...
@@ -297,8 +297,7 @@
count(1)
FROM t_gz_offer_info a
where a.del_flag = '0'
<include
refid=
"tGzOfferInfo_where"
/>
ORDER by a.create_time desc,a.id desc
<include
refid=
"tGzOfferInfo_where"
/>
</select>
<!-- 导出ORRER字段 -->
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/ExcelAttributeConstants.java
View file @
1f512df4
...
...
@@ -175,4 +175,26 @@ public class ExcelAttributeConstants {
public
static
final
String
GZ_SEX
=
"gz_sex"
;
// 瓜子的外签类型
public
static
final
String
GZ_OUT_SGIN_TYPE
=
"gz_out_sgin_type"
;
// 瓜子的民族
public
static
final
String
GZ_ETHNIC_GRP_CD
=
"gz_ethnic_grp_cd"
;
// 瓜子的政治面貌
public
static
final
String
GZ_POLITICAL_STA
=
"gz_political_sta"
;
// 瓜子的婚姻状态
public
static
final
String
GZ_MAR_STATUS
=
"gz_mar_status"
;
// 瓜子的驾驶证类型
public
static
final
String
GZ_DRIVER_TYPE
=
"gz_driver_type"
;
// 瓜子的紧急联系人关系
public
static
final
String
GZ_EMERG_RELATION
=
"gz_emerg_relation"
;
// 瓜子的合同签署方式
public
static
final
String
GZ_SGINATURE_METHOD
=
"gz_sginature_method"
;
// 瓜子的合同类型
public
static
final
String
GZ_CONTRACT_TYPE
=
"gz_contract_type"
;
// 瓜子的合同签订类型
public
static
final
String
GZ_SGINATURE_TYPE
=
"gz_sginature_type"
;
// 瓜子的户口类型
public
static
final
String
GZ_HUKOU_TYPE
=
"gz_hukou_type"
;
// 瓜子的银行账户类型
public
static
final
String
GZ_ACCOUNT_TYPE
=
"gz_account_type"
;
// 瓜子的银行
public
static
final
String
GZ_BANK
=
"gz_bank"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/ExcelUtil.java
View file @
1f512df4
...
...
@@ -1144,4 +1144,51 @@ public class ExcelUtil <T> implements Serializable {
}
return
nameDicMap
;
}
/**
* @param clazz 类
* @param nameDicMap 需要翻译的属性
* @param redisLabelMap 字典MAP,这里传进来,额外加上固定需要翻译的值
* @Description: 组装需要翻译的map,并且组装固定的值的map
* @Author: hgw
* @Date: 2025/6/18 14:49
* @return: void
**/
public
static
void
getDictMapAndExp
(
Class
<?>
clazz
,
Map
<
String
,
String
>
nameDictMap
,
Map
<
String
,
String
>
redisLabelMap
)
{
// 得到所有定义字段
Field
[]
allFields
=
clazz
.
getDeclaredFields
();
List
<
Field
>
fieldList
=
new
ArrayList
<>();
// 将需要字典表头存起来备用,如果没传,则全部翻译
for
(
Field
field
:
allFields
)
{
if
(
field
.
isAnnotationPresent
(
ExcelAttribute
.
class
))
{
fieldList
.
add
(
field
);
}
}
ExcelAttribute
attr
;
Field
field
;
String
[]
convertSource
;
String
[]
itemArray
;
for
(
int
j
=
0
;
j
<
fieldList
.
size
();
j
++)
{
field
=
fieldList
.
get
(
j
);
attr
=
field
.
getAnnotation
(
ExcelAttribute
.
class
);
if
(
Common
.
isNotNull
(
field
)
&&
Common
.
isNotNull
(
attr
)){
if
(
Common
.
isNotNull
(
attr
.
dataType
()))
{
nameDictMap
.
put
(
field
.
getName
(),
attr
.
dataType
());
}
else
if
(
Common
.
isNotNull
(
attr
.
isArea
())
&&
attr
.
isArea
())
{
nameDictMap
.
put
(
field
.
getName
(),
CacheConstants
.
AREA_VALUE_ALL
);
}
else
if
(
Common
.
isNotNull
(
attr
.
readConverterExp
()))
{
convertSource
=
attr
.
readConverterExp
().
split
(
","
);
if
(
Common
.
isNotNull
(
convertSource
))
{
for
(
String
item
:
convertSource
)
{
itemArray
=
item
.
split
(
"="
);
if
(
itemArray
.
length
>
1
)
{
redisLabelMap
.
put
(
field
.
getName
()+
CommonConstants
.
DOWN_LINE_STRING
+
itemArray
[
0
],
itemArray
[
1
]);
}
}
nameDictMap
.
put
(
field
.
getName
(),
field
.
getName
());
}
}
}
}
}
}
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