Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
f36f00b6
You need to sign in or sign up before continuing.
Commit
f36f00b6
authored
Jan 18, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.4-B端社保、档案
parent
40f8368d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
182 additions
and
34 deletions
+182
-34
TSalaryStandardIssue.java
...loud/plus/v1/yifu/salary/entity/TSalaryStandardIssue.java
+17
-17
TSalaryStandardIssueExportVo.java
.../plus/v1/yifu/salary/vo/TSalaryStandardIssueExportVo.java
+104
-0
TSalaryStandardIssueMapper.java
...lus/v1/yifu/salary/mapper/TSalaryStandardIssueMapper.java
+6
-0
TSalaryStandardIssueServiceImpl.java
.../salary/service/impl/TSalaryStandardIssueServiceImpl.java
+18
-17
TSalaryStandardIssueMapper.xml
.../src/main/resources/mapper/TSalaryStandardIssueMapper.xml
+37
-0
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryStandardIssue.java
View file @
f36f00b6
...
@@ -50,30 +50,30 @@ public class TSalaryStandardIssue extends BaseEntity {
...
@@ -50,30 +50,30 @@ public class TSalaryStandardIssue extends BaseEntity {
@Schema
(
description
=
"id"
)
@Schema
(
description
=
"id"
)
private
String
id
;
private
String
id
;
/**
/**
*
部门
ID
*
项目
ID
*/
*/
@ExcelAttribute
(
name
=
"
部门ID"
,
isNotEmpty
=
true
,
errorInfo
=
"部门
ID不能为空"
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"
项目ID"
,
isNotEmpty
=
true
,
errorInfo
=
"项目
ID不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"
部门
ID不能为空"
)
@NotBlank
(
message
=
"
项目
ID不能为空"
)
@Length
(
max
=
32
,
message
=
"
部门
ID不能超过32个字符"
)
@Length
(
max
=
32
,
message
=
"
项目
ID不能超过32个字符"
)
@ExcelProperty
(
"
部门
ID"
)
@ExcelProperty
(
"
项目
ID"
)
@Schema
(
description
=
"
部门
ID"
)
@Schema
(
description
=
"
项目
ID"
)
private
String
deptId
;
private
String
deptId
;
/**
/**
*
部门
名称
*
项目
名称
*/
*/
@ExcelAttribute
(
name
=
"
部门名称"
,
isNotEmpty
=
true
,
errorInfo
=
"部门
名称不能为空"
,
maxLength
=
50
)
@ExcelAttribute
(
name
=
"
项目名称"
,
isNotEmpty
=
true
,
errorInfo
=
"项目
名称不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"
部门
名称不能为空"
)
@NotBlank
(
message
=
"
项目
名称不能为空"
)
@Length
(
max
=
50
,
message
=
"
部门
名称不能超过50个字符"
)
@Length
(
max
=
50
,
message
=
"
项目
名称不能超过50个字符"
)
@ExcelProperty
(
"
部门
名称"
)
@ExcelProperty
(
"
项目
名称"
)
@Schema
(
description
=
"
部门
名称"
)
@Schema
(
description
=
"
项目
名称"
)
private
String
deptName
;
private
String
deptName
;
/**
/**
*
部门
编码
*
项目
编码
*/
*/
@ExcelAttribute
(
name
=
"
部门
编码"
,
maxLength
=
32
)
@ExcelAttribute
(
name
=
"
项目
编码"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"
部门
编码不能超过32个字符"
)
@Length
(
max
=
32
,
message
=
"
项目
编码不能超过32个字符"
)
@ExcelProperty
(
"
部门
编码"
)
@ExcelProperty
(
"
项目
编码"
)
@Schema
(
description
=
"
部门
编码"
)
@Schema
(
description
=
"
项目
编码"
)
private
String
deptNo
;
private
String
deptNo
;
/**
/**
* 户名
* 户名
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TSalaryStandardIssueExportVo.java
0 → 100644
View file @
f36f00b6
/*
* 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
.
salary
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
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
;
/**
* 薪资代发户配置
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
@Data
@Schema
(
description
=
"薪资代发户配置导出Vo"
)
public
class
TSalaryStandardIssueExportVo
{
/**
* 项目名称
*/
@ExcelAttribute
(
name
=
"项目名称"
,
isNotEmpty
=
true
,
errorInfo
=
"项目名称不能为空"
,
maxLength
=
50
)
@NotBlank
(
message
=
"项目名称不能为空"
)
@Length
(
max
=
50
,
message
=
"项目名称不能超过50个字符"
)
@ExcelProperty
(
"项目名称"
)
@Schema
(
description
=
"项目名称"
)
private
String
deptName
;
/**
* 项目编码
*/
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"项目编码不能超过32个字符"
)
@ExcelProperty
(
"项目编码"
)
@Schema
(
description
=
"项目编码"
)
private
String
deptNo
;
/**
* 户名
*/
@ExcelAttribute
(
name
=
"户名"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"户名不能超过50个字符"
)
@ExcelProperty
(
"户名"
)
@Schema
(
description
=
"户名"
)
private
String
orgName
;
/**
* 开户行总行
*/
@ExcelAttribute
(
name
=
"开户行总行"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"开户行总行不能超过50个字符"
)
@ExcelProperty
(
"开户行总行"
)
@Schema
(
description
=
"开户行总行"
)
private
String
bankName
;
/**
* 开户行支行
*/
@ExcelAttribute
(
name
=
"开户行支行"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"开户行支行不能超过50个字符"
)
@ExcelProperty
(
"开户行支行"
)
@Schema
(
description
=
"开户行支行"
)
private
String
bankSubName
;
/**
* 银行卡号
*/
@ExcelAttribute
(
name
=
"银行卡号"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"银行卡号不能超过50个字符"
)
@ExcelProperty
(
"银行卡号"
)
@Schema
(
description
=
"银行卡号"
)
private
String
bankNo
;
/**
* 开户行省
*/
@ExcelAttribute
(
name
=
"开户行省"
)
@ExcelProperty
(
"开户行省"
)
@Schema
(
description
=
"开户行省"
)
private
String
bankProvinceName
;
/**
* 开户行市
*/
@ExcelAttribute
(
name
=
"开户行市"
)
@ExcelProperty
(
"开户行市"
)
@Schema
(
description
=
"开户行市"
)
private
String
bankCityName
;
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryStandardIssueMapper.java
View file @
f36f00b6
...
@@ -21,9 +21,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -21,9 +21,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssue
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssue
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardIssueExportVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* 薪资代发户配置
* 薪资代发户配置
*
*
...
@@ -38,4 +41,7 @@ public interface TSalaryStandardIssueMapper extends BaseMapper<TSalaryStandardIs
...
@@ -38,4 +41,7 @@ public interface TSalaryStandardIssueMapper extends BaseMapper<TSalaryStandardIs
* @return
* @return
*/
*/
IPage
<
TSalaryStandardIssue
>
getTSalaryStandardIssuePage
(
Page
<
TSalaryStandardIssue
>
page
,
@Param
(
"tSalaryStandardIssue"
)
TSalaryStandardIssue
tSalaryStandardIssue
);
IPage
<
TSalaryStandardIssue
>
getTSalaryStandardIssuePage
(
Page
<
TSalaryStandardIssue
>
page
,
@Param
(
"tSalaryStandardIssue"
)
TSalaryStandardIssue
tSalaryStandardIssue
);
List
<
TSalaryStandardIssueExportVo
>
getTSalaryStandardIssueVoList
(
@Param
(
"tSalaryStandardIssue"
)
TSalaryStandardIssue
tSalaryStandardIssue
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardIssueServiceImpl.java
View file @
f36f00b6
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
cn.hutool.core.util.ArrayUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcel
Factory
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
@@ -28,11 +28,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -28,11 +28,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
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.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
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
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssue
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssue
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardIssueMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardIssueMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardIssueService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardIssueService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardIssueExportVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardIssueSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardIssueSearchVo
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -74,7 +74,7 @@ public class TSalaryStandardIssueServiceImpl extends ServiceImpl<TSalaryStandard
...
@@ -74,7 +74,7 @@ public class TSalaryStandardIssueServiceImpl extends ServiceImpl<TSalaryStandard
public
void
listExport
(
HttpServletResponse
response
,
TSalaryStandardIssueSearchVo
searchVo
)
{
public
void
listExport
(
HttpServletResponse
response
,
TSalaryStandardIssueSearchVo
searchVo
)
{
String
fileName
=
"薪资代发户配置批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
fileName
=
"薪资代发户配置批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
//获取要导出的列表
List
<
TSalaryStandardIssue
>
list
=
new
ArrayList
<>();
List
<
TSalaryStandardIssue
ExportVo
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
long
count
=
noPageCountDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
ServletOutputStream
out
=
null
;
try
{
try
{
...
@@ -83,32 +83,23 @@ public class TSalaryStandardIssueServiceImpl extends ServiceImpl<TSalaryStandard
...
@@ -83,32 +83,23 @@ public class TSalaryStandardIssueServiceImpl extends ServiceImpl<TSalaryStandard
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TSalaryStandardIssue
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
Factory
.
write
(
out
,
TSalaryStandardIssueExportVo
.
class
).
build
();
int
index
=
0
;
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
for
(
int
i
=
0
;
i
<=
count
;
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
// 获取实际记录
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
list
=
exportList
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TSalaryStandardIssue
>
util
=
new
ExcelUtil
<>(
TSalaryStandardIssue
.
class
);
WriteSheet
writeSheet
=
EasyExcelFactory
.
writerSheet
(
"代发户配置"
+
index
).
build
();
for
(
TSalaryStandardIssue
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"薪资代发户配置"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
list
.
clear
();
}
}
}
}
}
else
{
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"薪资
代发户配置"
+
index
).
build
();
WriteSheet
writeSheet
=
EasyExcel
Factory
.
writerSheet
(
"
代发户配置"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
excelWriter
.
write
(
list
,
writeSheet
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
if
(
Common
.
isNotNull
(
list
))
{
...
@@ -143,6 +134,16 @@ public class TSalaryStandardIssueServiceImpl extends ServiceImpl<TSalaryStandard
...
@@ -143,6 +134,16 @@ public class TSalaryStandardIssueServiceImpl extends ServiceImpl<TSalaryStandard
return
baseMapper
.
selectList
(
wrapper
);
return
baseMapper
.
selectList
(
wrapper
);
}
}
/**
* @Description: 导出
* @Author: hgw
* @Date: 2023/1/18 10:31
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardIssueExportVo>
**/
private
List
<
TSalaryStandardIssueExportVo
>
exportList
(
TSalaryStandardIssueSearchVo
searchVo
)
{
return
baseMapper
.
getTSalaryStandardIssueVoList
(
searchVo
);
}
private
Long
noPageCountDiy
(
TSalaryStandardIssueSearchVo
searchVo
)
{
private
Long
noPageCountDiy
(
TSalaryStandardIssueSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TSalaryStandardIssue
>
wrapper
=
buildQueryWrapper
(
searchVo
);
LambdaQueryWrapper
<
TSalaryStandardIssue
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardIssueMapper.xml
View file @
f36f00b6
...
@@ -42,6 +42,17 @@
...
@@ -42,6 +42,17 @@
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
</resultMap>
</resultMap>
<resultMap
id=
"tSalaryStandardIssueExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardIssueExportVo"
>
<result
property=
"deptName"
column=
"DEPT_NAME"
/>
<result
property=
"deptNo"
column=
"DEPT_NO"
/>
<result
property=
"orgName"
column=
"ORG_NAME"
/>
<result
property=
"bankName"
column=
"BANK_NAME"
/>
<result
property=
"bankSubName"
column=
"BANK_SUB_NAME"
/>
<result
property=
"bankNo"
column=
"BANK_NO"
/>
<result
property=
"bankProvinceName"
column=
"BANK_PROVINCE_NAME"
/>
<result
property=
"bankCityName"
column=
"BANK_CITY_NAME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ID,
a.DEPT_ID,
a.DEPT_ID,
...
@@ -119,5 +130,31 @@
...
@@ -119,5 +130,31 @@
1=1
1=1
<include
refid=
"tSalaryStandardIssue_where"
/>
<include
refid=
"tSalaryStandardIssue_where"
/>
</where>
</where>
order by a.CREATE_TIME desc
</select>
<!--导出-->
<select
id=
"getTSalaryStandardIssueVoList"
resultMap=
"tSalaryStandardIssueExportMap"
>
SELECT
a.DEPT_NAME,
a.DEPT_NO,
a.ORG_NAME,
a.BANK_NAME,
a.BANK_SUB_NAME,
a.BANK_NO,
a.BANK_PROVINCE_NAME,
a.BANK_CITY_NAME
FROM t_salary_standard_issue a
<where>
1=1
<include
refid=
"tSalaryStandardIssue_where"
/>
</where>
order by a.CREATE_TIME desc
<if
test=
"tSalaryStandardIssue != null"
>
<if
test=
"tSalaryStandardIssue.limitStart != null"
>
limit #{tSalaryStandardIssue.limitStart},#{tSalaryStandardIssue.limitEnd}
</if>
</if>
</select>
</select>
</mapper>
</mapper>
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