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
af064acd
Commit
af064acd
authored
Jul 01, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
9c61a15d
3ebb9f7f
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
124 additions
and
41 deletions
+124
-41
TCertRecord.java
.../yifu/cloud/plus/v1/yifu/archives/entity/TCertRecord.java
+8
-7
TEmpBadRecord.java
...ifu/cloud/plus/v1/yifu/archives/entity/TEmpBadRecord.java
+1
-0
TEmpEducation.java
...ifu/cloud/plus/v1/yifu/archives/entity/TEmpEducation.java
+6
-3
EmpBadRecordSearchVo.java
.../cloud/plus/v1/yifu/archives/vo/EmpBadRecordSearchVo.java
+10
-0
TEmpBadRecordController.java
.../v1/yifu/archives/controller/TEmpBadRecordController.java
+18
-0
TEmployeeProjectController.java
.../yifu/archives/controller/TEmployeeProjectController.java
+1
-1
TEmpBadRecordServiceImpl.java
.../yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
+55
-20
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+2
-2
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+2
-2
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+3
-0
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+1
-0
ExcelUtil.java
...m/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
+1
-0
LocalDateTimeUtils.java
...oud/plus/v1/yifu/common/core/util/LocalDateTimeUtils.java
+9
-0
pom.xml
yifu-common/yifu-common-mybatis/pom.xml
+2
-1
BaseEntity.java
...fu.cloud.plus.v1/yifu/common/mybatis/base/BaseEntity.java
+4
-0
DictController.java
...u.cloud.plus.v1/yifu/admin/controller/DictController.java
+1
-5
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TCertRecord.java
View file @
af064acd
...
...
@@ -26,6 +26,7 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
* 证明开具记录表
...
...
@@ -94,14 +95,14 @@ public class TCertRecord extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"合同开始时间"
)
@Schema
(
description
=
"合同开始时间"
)
private
LocalDateTim
e
contractStart
;
private
Dat
e
contractStart
;
/**
* 合同截止时间
*/
@ExcelAttribute
(
name
=
"合同截止时间"
)
@Schema
(
description
=
"合同截止时间"
)
private
LocalDateTim
e
contractEnd
;
private
Dat
e
contractEnd
;
/**
* 开具当天时间
...
...
@@ -129,7 +130,7 @@ public class TCertRecord extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"离职时间"
)
@Schema
(
description
=
"离职时间"
)
private
LocalDateTim
e
leaveTime
;
private
Dat
e
leaveTime
;
/**
* 派减原因
...
...
@@ -150,14 +151,14 @@ public class TCertRecord extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"入职时间(来我单位时间)"
)
@Schema
(
description
=
"入职时间(来我单位时间)"
)
private
LocalDateTim
e
entryTime
;
private
Dat
e
entryTime
;
/**
* 签订合同时间-第一次
*/
@ExcelAttribute
(
name
=
"签订合同时间-第一次"
)
@Schema
(
description
=
"签订合同时间-第一次"
)
private
LocalDateTim
e
firstContractTime
;
private
Dat
e
firstContractTime
;
/**
* 开具人
...
...
@@ -171,7 +172,7 @@ public class TCertRecord extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"开具时间"
)
@Schema
(
description
=
"开具时间"
)
private
LocalDateTim
e
openTime
;
private
Dat
e
openTime
;
/**
* 介绍单位
...
...
@@ -185,7 +186,7 @@ public class TCertRecord extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"参保时间"
)
@Schema
(
description
=
"参保时间"
)
private
LocalDateTim
e
socialTime
;
private
Dat
e
socialTime
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmpBadRecord.java
View file @
af064acd
...
...
@@ -129,5 +129,6 @@ public class TEmpBadRecord extends BaseEntity {
* @Date 14:53 2022/6/21
**/
@TableField
(
exist
=
false
)
@ExcelIgnore
private
String
attaIds
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmpEducation.java
View file @
af064acd
...
...
@@ -17,13 +17,14 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.Max
;
import
java.
time.Local
Date
;
import
java.
util.
Date
;
/**
* 员工学历信息表
...
...
@@ -74,8 +75,9 @@ public class TEmpEducation extends BaseEntity {
/**
* 入学时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@Schema
(
description
=
"入学时间"
)
private
Local
Date
entryDate
;
private
Date
entryDate
;
/**
* 学历名称
...
...
@@ -87,8 +89,9 @@ public class TEmpEducation extends BaseEntity {
/**
* 结业日期
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@Schema
(
description
=
"结业日期"
)
private
Local
Date
gradutionDate
;
private
Date
gradutionDate
;
/**
* 学校名称
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpBadRecordSearchVo.java
View file @
af064acd
...
...
@@ -21,4 +21,14 @@ public class EmpBadRecordSearchVo extends TEmpBadRecord {
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
/**
* @Author fxj
* 查询数据起
**/
private
int
limitStart
;
/**
* @Author fxj
* 查询数据止
**/
private
int
limitEnd
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpBadRecordController.java
View file @
af064acd
...
...
@@ -37,6 +37,9 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -87,6 +90,21 @@ public class TEmpBadRecordController {
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_tempbadrecord_get')"
)
public
R
<
TEmpBadRecord
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
/* TEmpBadRecord record;
List<TEmpBadRecord> list = new ArrayList<>();
for (int i=200000;i<500000;i++){
record = new TEmpBadRecord();
record.setEmpId("1");
record.setEmpName("2");
record.setEmpIdcard("323333333333");
record.setHappenTime(new Date());
record.setLoseFee(BigDecimal.ONE);
record.setId(String.valueOf(i));
record.setProject("test");
record.setProjectCode("test");
list.add(record);
}
tEmpBadRecordService.saveBatch(list);*/
return
R
.
ok
(
tEmpBadRecordService
.
getById
(
id
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeProjectController.java
View file @
af064acd
...
...
@@ -66,7 +66,7 @@ public class TEmployeeProjectController {
@Operation
(
summary
=
"根据人员档案id获取项目list"
,
description
=
"根据人员档案id获取项目list"
)
@GetMapping
(
"/getListByEmpId"
)
public
R
<
List
<
TEmployeeProject
>>
getListByEmpId
(
@RequestParam
String
empId
)
{
return
R
.
ok
(
tEmployeeProjectService
.
getListByEmpId
(
empId
,
CommonConstants
.
ZERO
_INT
));
return
R
.
ok
(
tEmployeeProjectService
.
getListByEmpId
(
empId
,
CommonConstants
.
ONE
_INT
));
}
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
View file @
af064acd
...
...
@@ -31,7 +31,6 @@ 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.TEmpBadRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper
;
...
...
@@ -39,7 +38,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpBadRecordMapper;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpBadRecordService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpBadRecordSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpBadRecordVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
...
...
@@ -208,27 +208,49 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
String
fileName
=
"不良记录批量导出"
+
LocalDateTime
.
now
()
+
".xlsx"
;
//获取要导出的列表
List
<
TEmpBadRecord
>
list
=
new
ArrayList
<>();
//获取记录
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TEmpBadRecord
>
util
=
new
ExcelUtil
<>(
TEmpBadRecord
.
class
);
for
(
TEmpBadRecord
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
long
count
=
noPageCountDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
if
(
list
.
size
()>
0
)
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename*=utf-8'zh_cn'"
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel
.
write
(
out
,
TEmpBadRecord
.
class
).
sheet
(
"不良记录"
).
doWrite
(
list
);
out
.
flush
();
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename*=utf-8'zh_cn'"
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TEmpBadRecord
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TEmpBadRecord
>
util
=
new
ExcelUtil
<>(
TEmpBadRecord
.
class
);
for
(
TEmpBadRecord
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"不良记录"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
}
excelWriter
.
finish
();
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"不良记录"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
excelWriter
.
finish
();
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
out
.
flush
();
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
finally
{
...
...
@@ -256,8 +278,21 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
TEmpBadRecord:
:
getId
,
idList
);
}
if
(
tEmpBadRecord
.
getLimitStart
()
>=
0
&&
tEmpBadRecord
.
getLimitEnd
()
>=
0
){
wrapper
.
last
(
" limit "
+
tEmpBadRecord
.
getLimitStart
()
+
","
+
tEmpBadRecord
.
getLimitEnd
());
}
return
baseMapper
.
selectList
(
wrapper
);
}
private
Long
noPageCountDiy
(
EmpBadRecordSearchVo
tEmpBadRecord
)
{
LambdaQueryWrapper
<
TEmpBadRecord
>
wrapper
=
buildQueryWrapper
(
tEmpBadRecord
);
List
<
String
>
idList
=
Common
.
getList
(
tEmpBadRecord
.
getIds
());
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
TEmpBadRecord:
:
getId
,
idList
);
}
return
baseMapper
.
selectCount
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
EmpBadRecordSearchVo
entity
){
LambdaQueryWrapper
<
TEmpBadRecord
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
af064acd
...
...
@@ -75,12 +75,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
//划转,更新项目信息
TEmployeeProject
updateTEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmpChangeInfo
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptN
ame
,
tEmpChangeInfo
.
getOldSettle
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmpChangeInfo
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptN
o
,
tEmpChangeInfo
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
updateTEmployeeProject
))
{
updateTEmployeeProject
.
setDeptNo
(
tEmpChangeInfo
.
getDeptNo
());
updateTEmployeeProject
.
setDeptId
(
tEmpChangeInfo
.
getDeptId
());
updateTEmployeeProject
.
setDeptName
(
tEmpChangeInfo
.
getNew
Dept
());
updateTEmployeeProject
.
setDeptName
(
tEmpChangeInfo
.
getNew
Settle
());
updateTEmployeeProject
.
setUnitId
(
tEmpChangeInfo
.
getUnitId
());
updateTEmployeeProject
.
setUnitNo
(
tEmpChangeInfo
.
getUnitNo
());
updateTEmployeeProject
.
setUnitName
(
tEmpChangeInfo
.
getNewDept
());
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
af064acd
...
...
@@ -1370,8 +1370,8 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
education
.
setHighIdentification
(
CommonConstants
.
ZERO_STRING
);
education
.
setSchool
(
employeeInfo
.
getSchool
());
education
.
setMajor
(
employeeInfo
.
getMajor
());
education
.
setEntryDate
(
employeeInfo
.
getAdmissionDate
(
));
education
.
setGradutionDate
(
employeeInfo
.
getGradutionDate
(
));
education
.
setEntryDate
(
LocalDateTimeUtils
.
convertLDToDate
(
employeeInfo
.
getAdmissionDate
()
));
education
.
setGradutionDate
(
LocalDateTimeUtils
.
convertLDToDate
(
employeeInfo
.
getGradutionDate
()
));
tEmpEducationService
.
insertEducationOfEmp
(
education
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
af064acd
...
...
@@ -150,6 +150,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
String
empNO
=
getEmpNo
(
tEmployeeProject
.
getDeptNo
());
tEmployeeProject
.
setEmpNo
(
empNO
);
tEmployeeProject
.
setEmpId
(
tEmployeeInfo
.
getId
());
tEmployeeProject
.
setProjectSource
(
CommonConstants
.
dingleDigitStrArray
[
5
]);
this
.
save
(
tEmployeeProject
);
return
R
.
ok
();
}
...
...
@@ -531,6 +532,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
YifuUser
user
=
SecurityUtils
.
getUser
();
insTEmployeePro
.
setCreateBy
(
user
.
getId
());
insTEmployeePro
.
setCreateName
(
user
.
getNickname
());
insTEmployeePro
.
setProjectSource
(
CommonConstants
.
dingleDigitStrArray
[
5
]);
proInsList
.
add
(
insTEmployeePro
);
}
...
...
@@ -683,6 +685,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
tEmployeeProject
.
setEmpName
(
employeeInfo
.
getEmpName
());
tEmployeeProject
.
setEmpIdcard
(
employeeInfo
.
getEmpIdcard
());
tEmployeeProject
.
setPost
(
employeeInfo
.
getPost
());
tEmployeeProject
.
setProjectSource
(
CommonConstants
.
dingleDigitStrArray
[
4
]);
String
empNO
=
getEmpNo
(
employeeInfo
.
getDeptNo
());
tEmployeeProject
.
setEmpNo
(
empNO
);
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
af064acd
...
...
@@ -256,4 +256,5 @@ public interface CommonConstants {
String
CREATE_TIME
=
"create_time"
;
String
ID
=
"ID"
;
String
PARAM_IS_NOT_ERROR
=
"传参异常,请检查参数"
;
int
EXCEL_EXPORT_LIMIT
=
60000
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
View file @
af064acd
...
...
@@ -230,6 +230,7 @@ public class ExcelUtil <T> implements Serializable {
if
(
field
==
null
)
{
continue
;
}
tempStr
=
null
;
// 设置实体类私有属性可访问
field
.
setAccessible
(
true
);
attr
=
field
.
getAnnotation
(
ExcelAttribute
.
class
);
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/LocalDateTimeUtils.java
View file @
af064acd
...
...
@@ -47,7 +47,16 @@ public class LocalDateTimeUtils {
}
return
null
;
}
public
static
LocalDateTime
convertLocalDateToLDT
(
LocalDate
date
)
{
return
LocalDateTime
.
ofInstant
(
date
.
atStartOfDay
(
ZoneOffset
.
ofHours
(
8
)).
toInstant
(),
ZoneId
.
systemDefault
());
}
public
static
Date
convertLDToDate
(
LocalDate
time
)
{
if
(
null
!=
time
){
return
Date
.
from
(
time
.
atStartOfDay
(
ZoneOffset
.
ofHours
(
8
)).
toInstant
());
}
return
null
;
}
//获取指定日期的毫秒
public
static
Long
getMilliByTime
(
LocalDateTime
time
)
{
...
...
yifu-common/yifu-common-mybatis/pom.xml
View file @
af064acd
...
...
@@ -77,10 +77,11 @@
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-common-core
</artifactId>
</dependency>
<!-- easyExcel -->
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
easyexcel
</artifactId>
<version>
3.
0.5
</version>
<version>
3.
1.1
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
...
...
yifu-common/yifu-common-mybatis/src/main/java/com/yifu.cloud.plus.v1/yifu/common/mybatis/base/BaseEntity.java
View file @
af064acd
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
mybatis
.
base
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
...
@@ -27,6 +28,7 @@ public class BaseEntity implements Serializable {
*/
@Schema
(
description
=
"创建人-姓名"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ExcelProperty
(
"创建人"
)
private
String
createName
;
/**
...
...
@@ -43,6 +45,7 @@ public class BaseEntity implements Serializable {
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"创建时间"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
@ExcelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
/**
...
...
@@ -59,6 +62,7 @@ public class BaseEntity implements Serializable {
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"更新时间"
)
@TableField
(
fill
=
FieldFill
.
INSERT_UPDATE
)
@ExcelProperty
(
"更新时间"
)
private
LocalDateTime
updateTime
;
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/DictController.java
View file @
af064acd
...
...
@@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDict
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDictItem
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRoleMenu
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysDictItemService
;
import
com.yifu.cloud.plus.v1.yifu.admin.service.SysDictService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
...
...
@@ -35,16 +34,13 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* <p>
...
...
@@ -96,7 +92,7 @@ public class DictController {
*/
@GetMapping
(
"/type/{type}"
)
@Cacheable
(
value
=
CacheConstants
.
DICT_DETAILS
,
key
=
"#type"
)
public
R
<
List
<
SysDictItem
>>
getDictByType
(
@PathVariable
String
type
)
{
public
R
<
List
<
SysDictItem
>>
getDictByType
(
@PathVariable
(
"type"
)
String
type
)
{
return
R
.
ok
(
sysDictItemService
.
list
(
Wrappers
.<
SysDictItem
>
query
().
lambda
().
eq
(
SysDictItem:
:
getType
,
type
)));
}
...
...
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