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
8aaf0c4c
Commit
8aaf0c4c
authored
Jun 28, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
223d6d66
c518d293
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
108 additions
and
42 deletions
+108
-42
CertRecordSearchVo.java
...fu/cloud/plus/v1/yifu/archives/vo/CertRecordSearchVo.java
+24
-0
EmpDisabilityExcelVO.java
.../cloud/plus/v1/yifu/archives/vo/EmpDisabilityExcelVO.java
+2
-2
EmpEducationExcelVO.java
...u/cloud/plus/v1/yifu/archives/vo/EmpEducationExcelVO.java
+3
-3
EmpEducationUpdateExcelVo.java
...d/plus/v1/yifu/archives/vo/EmpEducationUpdateExcelVo.java
+5
-5
EmpFamilyExcelVO.java
...yifu/cloud/plus/v1/yifu/archives/vo/EmpFamilyExcelVO.java
+1
-1
EmpWorkRecordExcelVO.java
.../cloud/plus/v1/yifu/archives/vo/EmpWorkRecordExcelVO.java
+2
-2
TCertRecordController.java
...us/v1/yifu/archives/controller/TCertRecordController.java
+7
-6
TCertRecordService.java
...oud/plus/v1/yifu/archives/service/TCertRecordService.java
+9
-0
TCertRecordServiceImpl.java
...v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
+44
-0
ExcelUtil.java
...m/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
+11
-23
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/CertRecordSearchVo.java
0 → 100644
View file @
8aaf0c4c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCertRecord
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* @Author fxj
* @Date 2022/6/28
* @Description
* @Version 1.0
*/
@Data
public
class
CertRecordSearchVo
extends
TCertRecord
{
private
String
ids
;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpDisabilityExcelVO.java
View file @
8aaf0c4c
...
...
@@ -68,7 +68,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
@ExcelAttribute
(
name
=
"伤残开始日期"
,
isNotEmpty
=
true
,
errorInfo
=
"伤残开始日期不能为空"
,
isDate
=
true
)
@NotNull
(
message
=
"伤残开始日期不能为空"
)
@Past
@DateTimeFormat
(
"
YYYY
-MM-dd"
)
@DateTimeFormat
(
"
yyyy
-MM-dd"
)
@ExcelProperty
(
value
=
"伤残开始日期"
)
private
Date
startTime
;
...
...
@@ -78,7 +78,7 @@ public class EmpDisabilityExcelVO extends RowIndex implements Serializable {
@ExcelAttribute
(
name
=
"伤残结束日期"
,
isNotEmpty
=
true
,
errorInfo
=
"伤残结束日期不能为空"
,
isDate
=
true
)
@NotNull
(
message
=
"伤残结束日期不能为空"
)
@Past
@DateTimeFormat
(
"
YYYY
-MM-dd"
)
@DateTimeFormat
(
"
yyyy
-MM-dd"
)
@ExcelProperty
(
value
=
"伤残结束日期"
)
private
Date
endTime
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpEducationExcelVO.java
View file @
8aaf0c4c
...
...
@@ -64,7 +64,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
/**
* 学历名称
*/
@ExcelAttribute
(
name
=
"学历"
,
errorInfo
=
"学历不可为空"
,
isDataId
=
true
,
dataType
=
"
system_degree_dict
"
)
@ExcelAttribute
(
name
=
"学历"
,
errorInfo
=
"学历不可为空"
,
isDataId
=
true
,
dataType
=
"
education
"
)
@NotNull
(
message
=
"学历不可为空"
)
@ExcelProperty
(
value
=
"学历"
)
private
String
educationName
;
...
...
@@ -96,7 +96,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
*/
@ExcelAttribute
(
name
=
"入学时间"
,
errorInfo
=
"入学时间不可为空"
,
isDate
=
true
)
@NotNull
(
message
=
"入学时间不可为空"
)
@DateTimeFormat
(
"
YYYY
-MM-dd"
)
@DateTimeFormat
(
"
yyyy
-MM-dd"
)
@ExcelProperty
(
value
=
"入学时间"
)
private
Date
entryDate
;
...
...
@@ -105,7 +105,7 @@ public class EmpEducationExcelVO extends RowIndex implements Serializable {
*/
@ExcelAttribute
(
name
=
"毕业时间"
,
errorInfo
=
"毕业时间不可为空"
,
isDate
=
true
)
@NotNull
(
message
=
"毕业时间不可为空"
)
@DateTimeFormat
(
"
YYYY
-MM-dd"
)
@DateTimeFormat
(
"
yyyy
-MM-dd"
)
@ExcelProperty
(
value
=
"毕业时间"
)
private
Date
gradutionDate
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpEducationUpdateExcelVo.java
View file @
8aaf0c4c
...
...
@@ -28,7 +28,7 @@ public class EmpEducationUpdateExcelVo extends RowIndex{
/**
* 学校名称
*/
@ExcelAttribute
(
name
=
"学校"
,
isNotEmpty
=
true
,
errorInfo
=
"学校不可为空"
)
@ExcelAttribute
(
name
=
"学校"
,
isNotEmpty
=
true
,
errorInfo
=
"学校不可为空"
,
maxLength
=
50
)
@NotNull
(
message
=
"学校不可为空"
)
@ExcelProperty
(
value
=
"学校"
)
private
String
school
;
...
...
@@ -36,7 +36,7 @@ public class EmpEducationUpdateExcelVo extends RowIndex{
/**
* 院系名称
*/
@ExcelAttribute
(
name
=
"院系名称"
)
@ExcelAttribute
(
name
=
"院系名称"
,
maxLength
=
50
)
@ExcelProperty
(
value
=
"院系名称"
)
private
String
collageSystem
;
...
...
@@ -44,7 +44,7 @@ public class EmpEducationUpdateExcelVo extends RowIndex{
/**
* 专业
*/
@ExcelAttribute
(
name
=
"专业"
,
isNotEmpty
=
true
,
errorInfo
=
"专业不可为空"
)
@ExcelAttribute
(
name
=
"专业"
,
isNotEmpty
=
true
,
errorInfo
=
"专业不可为空"
,
maxLength
=
50
)
@NotNull
(
message
=
"专业不可为空"
)
@ExcelProperty
(
value
=
"专业"
)
private
String
major
;
...
...
@@ -100,13 +100,13 @@ public class EmpEducationUpdateExcelVo extends RowIndex{
/**
* 证书名称
*/
@ExcelAttribute
(
name
=
"证书名称"
)
@ExcelAttribute
(
name
=
"证书名称"
,
maxLength
=
50
)
@ExcelProperty
(
value
=
"证书名称"
)
private
String
certificationName
;
/**
* 备注
*/
@ExcelAttribute
(
name
=
"
remark"
)
@ExcelAttribute
(
name
=
"
备注"
,
maxLength
=
200
)
@ExcelProperty
(
value
=
"备注"
)
private
String
remark
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpFamilyExcelVO.java
View file @
8aaf0c4c
...
...
@@ -58,7 +58,7 @@ public class EmpFamilyExcelVO extends RowIndex implements Serializable {
*/
@ExcelAttribute
(
name
=
"出生日期"
,
isDate
=
true
)
@Past
@DateTimeFormat
(
"
YYYY
-MM-dd"
)
@DateTimeFormat
(
"
yyyy
-MM-dd"
)
@ExcelProperty
(
value
=
"出生日期"
)
private
Date
birthday
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpWorkRecordExcelVO.java
View file @
8aaf0c4c
...
...
@@ -79,7 +79,7 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable {
* 开始工作日期
*/
@ExcelAttribute
(
name
=
"开始工作日期"
,
errorInfo
=
"开始工作日期不可为空"
,
isDate
=
true
)
@DateTimeFormat
(
"
YYYY
-MM-dd"
)
@DateTimeFormat
(
"
yyyy
-MM-dd"
)
@NotNull
(
message
=
"开始工作日期不可为空"
)
@ExcelProperty
(
value
=
"开始工作日期"
)
private
Date
startDate
;
...
...
@@ -88,7 +88,7 @@ public class EmpWorkRecordExcelVO extends RowIndex implements Serializable {
* 结束工作日期
*/
@ExcelAttribute
(
name
=
"结束工作日期"
,
isDate
=
true
)
@DateTimeFormat
(
"
YYYY
-MM-dd"
)
@DateTimeFormat
(
"
yyyy
-MM-dd"
)
@ExcelProperty
(
value
=
"结束工作日期"
)
private
Date
endDate
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TCertRecordController.java
View file @
8aaf0c4c
...
...
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCertRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TCertRecordService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.CertRecordSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCertRecordVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
...
...
@@ -54,25 +55,25 @@ public class TCertRecordController {
/**
* 分页查询
* @param page 分页对象
* @param
tCertRecord
证明开具记录表
* @param
searchVo
证明开具记录表
* @return
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
//@PreAuthorize("@pms.hasPermission('demo_tcertrecord_get')" )
public
R
<
IPage
<
TCertRecord
>>
getTCertRecordPage
(
Page
page
,
TCertRecord
tCertRecord
)
{
return
R
.
ok
(
tCertRecordService
.
page
(
page
,
Wrappers
.
query
(
tCertRecord
)
));
public
R
<
IPage
<
TCertRecord
>>
getTCertRecordPage
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
return
R
.
ok
(
tCertRecordService
.
page
Diy
(
page
,
searchVo
));
}
/**
* 不分页查询
* @param
tCertRecord
证明开具记录表
* @param
searchVo
证明开具记录表
* @return
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@GetMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('demo_tcertrecord_get')" )
public
R
<
List
<
TCertRecord
>>
getTCertRecordNoPage
(
TCertRecord
tCertRecord
)
{
return
R
.
ok
(
tCertRecordService
.
list
(
Wrappers
.
query
(
tCertRecord
)
));
public
R
<
List
<
TCertRecord
>>
getTCertRecordNoPage
(
CertRecordSearchVo
searchVo
)
{
return
R
.
ok
(
tCertRecordService
.
getTCertRecordNoPage
(
searchVo
));
}
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TCertRecordService.java
View file @
8aaf0c4c
...
...
@@ -17,11 +17,16 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCertRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.CertRecordSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCertRecordVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
java.util.List
;
/**
* 证明开具记录表
*
...
...
@@ -31,4 +36,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
public
interface
TCertRecordService
extends
IService
<
TCertRecord
>
{
R
<
TCertRecordVo
>
getCertRecordInfo
(
String
id
);
IPage
<
TCertRecord
>
pageDiy
(
Page
page
,
CertRecordSearchVo
searchVo
);
List
<
TCertRecord
>
getTCertRecordNoPage
(
CertRecordSearchVo
searchVo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
View file @
8aaf0c4c
...
...
@@ -16,6 +16,11 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
cn.hutool.core.util.ArrayUtil
;
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.TCertRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
...
...
@@ -24,13 +29,17 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCertRecordMapper;
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.TCertRecordService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.CertRecordSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TCertRecordVo
;
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.R
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* 证明开具记录表
*
...
...
@@ -79,4 +88,39 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
vo
.
setSocialTime
(
null
);
return
R
.
ok
(
vo
);
}
@Override
public
IPage
<
TCertRecord
>
pageDiy
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TCertRecord
>
wrapper
=
buildQueryWrapper
(
searchVo
);
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectPage
(
page
,
wrapper
);
}
@Override
public
List
<
TCertRecord
>
getTCertRecordNoPage
(
CertRecordSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TCertRecord
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
TCertRecord:
:
getId
,
idList
);
}
return
baseMapper
.
selectList
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
CertRecordSearchVo
entity
){
LambdaQueryWrapper
<
TCertRecord
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TCertRecord:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TCertRecord:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getEmpName
())){
wrapper
.
likeRight
(
TCertRecord:
:
getEmpName
,
entity
.
getEmpName
());
}
if
(
Common
.
isNotNull
(
entity
.
getEmpIdcard
())){
wrapper
.
likeRight
(
TCertRecord:
:
getEmpIdcard
,
entity
.
getEmpIdcard
());
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
())){
wrapper
.
eq
(
TCertRecord:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
View file @
8aaf0c4c
...
...
@@ -231,7 +231,12 @@ public class ExcelUtil <T> implements Serializable {
//如果是需要从字典表取值数据的话在这里处理即可
if
(
Common
.
isNotNull
(
attr
.
readConverterExp
()))
{
c
=
reverseByExp
(
c
,
attr
.
readConverterExp
());
tempStr
=
reverseByExp
(
c
,
attr
.
readConverterExp
());
if
(
Common
.
isEmpty
(
tempStr
)){
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
"未找到:"
+
c
+
"的字典数据"
),
errorTemp
);
}
else
{
c
=
tempStr
;
}
}
else
if
(
attr
.
isDataId
())
{
if
(
Common
.
isNotNull
(
attr
.
dataType
()))
{
//非区域字段处理 TODO
...
...
@@ -351,33 +356,16 @@ public class ExcelUtil <T> implements Serializable {
public
static
String
reverseByExp
(
String
propertyValue
,
String
converterExp
)
throws
Exception
{
try
{
String
[]
convertSource
=
converterExp
.
split
(
","
);
if
(
propertyValue
.
contains
(
","
)){
String
[]
valueSource
=
propertyValue
.
split
(
","
);
propertyValue
=
""
;
for
(
String
value:
valueSource
){
for
(
String
item
:
convertSource
)
{
String
[]
itemArray
=
item
.
split
(
"="
);
if
(
itemArray
[
1
].
equals
(
value
))
{
propertyValue
+=
itemArray
[
0
]
+
","
;
break
;
}
}
}
if
(
propertyValue
.
endsWith
(
","
)){
propertyValue
=
propertyValue
.
substring
(
CommonConstants
.
dingleDigitIntArray
[
0
],
propertyValue
.
length
()-
1
);
}
}
else
{
for
(
String
item
:
convertSource
)
{
String
[]
itemArray
=
item
.
split
(
"="
);
if
(
itemArray
[
1
].
equals
(
propertyValue
))
{
return
itemArray
[
0
];
}
}
}
}
catch
(
Exception
e
)
{
throw
e
;
}
return
propertyValue
;
return
null
;
}
/**
...
...
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