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
827b9246
Commit
827b9246
authored
Jun 30, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://git.yifucenter.com/fangxinjiang/yifu
into develop
parents
5b6dcb8a
904b9763
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
46 deletions
+69
-46
TEmpBadRecord.java
...ifu/cloud/plus/v1/yifu/archives/entity/TEmpBadRecord.java
+8
-1
EmployeeExportVO.java
...yifu/cloud/plus/v1/yifu/archives/vo/EmployeeExportVO.java
+3
-3
TEmpBadRecordServiceImpl.java
.../yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
+13
-2
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+1
-1
ExcelUtil.java
...m/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
+42
-35
DictItemRedisInit.java
...yifu/cloud/plus/v1/yifu/admin/init/DictItemRedisInit.java
+2
-4
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmpBadRecord.java
View file @
827b9246
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
...
@@ -122,5 +123,11 @@ public class TEmpBadRecord extends BaseEntity {
...
@@ -122,5 +123,11 @@ public class TEmpBadRecord extends BaseEntity {
@ExcelProperty
(
"其他损失"
)
@ExcelProperty
(
"其他损失"
)
private
BigDecimal
loseFeeOther
;
private
BigDecimal
loseFeeOther
;
/**
* @Author fxj
* @Description 附件ID
* @Date 14:53 2022/6/21
**/
@TableField
(
exist
=
false
)
private
String
attaIds
;
}
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeExportVO.java
View file @
827b9246
...
@@ -75,15 +75,15 @@ public class EmployeeExportVO extends BaseEntity {
...
@@ -75,15 +75,15 @@ public class EmployeeExportVO extends BaseEntity {
@ExcelProperty
(
value
=
"邮箱"
)
@ExcelProperty
(
value
=
"邮箱"
)
private
String
empEmail
;
private
String
empEmail
;
@ExcelAttribute
(
name
=
"户籍所在省"
,
is
DataId
=
true
,
is
Area
=
true
)
@ExcelAttribute
(
name
=
"户籍所在省"
,
isArea
=
true
)
@ExcelProperty
(
value
=
"户籍所在省"
)
@ExcelProperty
(
value
=
"户籍所在省"
)
private
String
idProvince
;
private
String
idProvince
;
@ExcelAttribute
(
name
=
"户籍所在市"
,
isDataId
=
true
,
isArea
=
true
,
parentField
=
"idProvince"
)
@ExcelAttribute
(
name
=
"户籍所在市"
,
isArea
=
true
,
parentField
=
"idProvince"
)
@ExcelProperty
(
value
=
"户籍所在市"
)
@ExcelProperty
(
value
=
"户籍所在市"
)
private
String
idCity
;
private
String
idCity
;
@ExcelAttribute
(
name
=
"户籍所在县"
,
isDataId
=
true
,
isArea
=
true
,
parentField
=
"idCity"
)
@ExcelAttribute
(
name
=
"户籍所在县"
,
isArea
=
true
,
parentField
=
"idCity"
)
@ExcelProperty
(
value
=
"户籍所在县"
)
@ExcelProperty
(
value
=
"户籍所在县"
)
private
String
idTown
;
private
String
idTown
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
View file @
827b9246
...
@@ -34,6 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord;
...
@@ -34,6 +34,7 @@ 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.TEmpWorkRecording
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
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.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpBadRecordMapper
;
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.TEmployeeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper
;
...
@@ -66,7 +67,7 @@ import java.util.List;
...
@@ -66,7 +67,7 @@ import java.util.List;
@RequiredArgsConstructor
@RequiredArgsConstructor
@Service
@Service
public
class
TEmpBadRecordServiceImpl
extends
ServiceImpl
<
TEmpBadRecordMapper
,
TEmpBadRecord
>
implements
TEmpBadRecordService
{
public
class
TEmpBadRecordServiceImpl
extends
ServiceImpl
<
TEmpBadRecordMapper
,
TEmpBadRecord
>
implements
TEmpBadRecordService
{
private
final
TAttaInfoMapper
attaInfoMapper
;
private
final
TEmployeeInfoMapper
employeeInfoMapper
;
private
final
TEmployeeInfoMapper
employeeInfoMapper
;
private
final
TEmployeeProjectMapper
projectMapper
;
private
final
TEmployeeProjectMapper
projectMapper
;
...
@@ -128,7 +129,17 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
...
@@ -128,7 +129,17 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
@Override
@Override
public
R
<
Boolean
>
saveDiy
(
TEmpBadRecord
tEmpBadRecord
)
{
public
R
<
Boolean
>
saveDiy
(
TEmpBadRecord
tEmpBadRecord
)
{
return
R
.
ok
(
baseMapper
.
insert
(
tEmpBadRecord
)
>
0
);
int
res
=
baseMapper
.
insert
(
tEmpBadRecord
);
if
(
res
<
0
){
return
R
.
failed
();
}
//更新附件信息
List
<
String
>
ids
;
if
(
Common
.
isNotNull
(
tEmpBadRecord
.
getAttaIds
())){
ids
=
Common
.
initStrToList
(
tEmpBadRecord
.
getAttaIds
(),
CommonConstants
.
COMMA_STRING
);
attaInfoMapper
.
updateDomainId
(
tEmpBadRecord
.
getId
(),
ids
);
}
return
R
.
ok
();
}
}
private
void
importEmpBadRecord
(
List
<
EmpBadRecordVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
private
void
importEmpBadRecord
(
List
<
EmpBadRecordVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
)
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
827b9246
...
@@ -790,7 +790,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -790,7 +790,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
empIdCard
));
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
empIdCard
));
Map
<
String
,
String
>
projectMap
=
new
HashMap
<>();
Map
<
String
,
String
>
projectMap
=
new
HashMap
<>();
if
(
Common
.
is
Empty
(
projects
)){
if
(
Common
.
is
NotNull
(
projects
)){
for
(
TEmployeeProject
project:
projects
){
for
(
TEmployeeProject
project:
projects
){
projectMap
.
put
(
project
.
getDeptName
(),
project
.
getDeptNo
());
projectMap
.
put
(
project
.
getDeptName
(),
project
.
getDeptNo
());
}
}
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/ExcelUtil.java
View file @
827b9246
...
@@ -39,6 +39,8 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -39,6 +39,8 @@ public class ExcelUtil <T> implements Serializable {
private
Field
[]
fields
;
private
Field
[]
fields
;
public
void
convertEntity
(
T
vo
,
String
[]
exportFields
,
Map
<
String
,
String
>
diyDicMap
,
String
dateFormat
)
{
public
void
convertEntity
(
T
vo
,
String
[]
exportFields
,
Map
<
String
,
String
>
diyDicMap
,
String
dateFormat
)
{
String
provinceTemp
;
String
cityTemp
;
// 得到所有定义字段
// 得到所有定义字段
Field
[]
allFields
=
clazz
.
getDeclaredFields
();
Field
[]
allFields
=
clazz
.
getDeclaredFields
();
List
<
Field
>
fields
=
new
ArrayList
<>();
List
<
Field
>
fields
=
new
ArrayList
<>();
...
@@ -129,12 +131,7 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -129,12 +131,7 @@ public class ExcelUtil <T> implements Serializable {
}
}
}
else
if
(
attr
.
isArea
()){
}
else
if
(
attr
.
isArea
()){
//区域字段处理 TODO
//区域字段处理 TODO
if
(!
Common
.
isNotNull
(
attr
.
parentField
()))
{
value
=
getAreaLabel
(
"area_"
+
field
.
get
(
vo
));
value
=
getAreaLabel
(
"area_"
+
field
.
get
(
vo
)
+
"_0"
,
attr
);
}
else
{
// TODO
value
=
getAreaLabel
(
"area_"
+
field
.
get
(
vo
)+
"_"
+
getFieldValueByName
(
attr
.
parentField
(),
vo
,
null
),
attr
);
}
}
}
field
.
set
(
vo
,
Common
.
isNotNull
(
value
)?
value:
field
.
get
(
vo
));
field
.
set
(
vo
,
Common
.
isNotNull
(
value
)?
value:
field
.
get
(
vo
));
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
@@ -224,6 +221,7 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -224,6 +221,7 @@ public class ExcelUtil <T> implements Serializable {
String
tempStr
=
""
;
String
tempStr
=
""
;
ErrorMessage
errorTemp
=
null
;
ErrorMessage
errorTemp
=
null
;
errorMessageHashMap
=
new
HashMap
<>();
errorMessageHashMap
=
new
HashMap
<>();
Map
<
String
,
Field
>
mapArea
=
new
HashMap
<>();
// 参数校验
// 参数校验
ExcelAttribute
attr
=
null
;
ExcelAttribute
attr
=
null
;
try
{
try
{
...
@@ -272,7 +270,8 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -272,7 +270,8 @@ public class ExcelUtil <T> implements Serializable {
tempStr = dicMap.get(attr.dataType() + "_" + c.trim());
tempStr = dicMap.get(attr.dataType() + "_" + c.trim());
}*/
}*/
}
else
{
}
}
else
{
if
(
attr
.
isArea
())
{
if
(
attr
.
isArea
())
{
//区域字段处理 TODO
//区域字段处理 TODO
if
(!
Common
.
isNotNull
(
attr
.
parentField
()))
{
if
(!
Common
.
isNotNull
(
attr
.
parentField
()))
{
...
@@ -303,14 +302,17 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -303,14 +302,17 @@ public class ExcelUtil <T> implements Serializable {
}
}
if
(
Common
.
isNotNull
(
tempStr
)){
if
(
Common
.
isNotNull
(
tempStr
)){
c
=
tempStr
;
c
=
tempStr
;
}
mapArea
.
put
(
tempStr
,
field
);
}
}
// 取得类型,并根据对象类型设置值.
// 取得类型,并根据对象类型设置值.
fieldType
=
field
.
getType
();
fieldType
=
field
.
getType
();
if
(
fieldType
==
null
)
{
if
(
fieldType
==
null
)
{
continue
;
continue
;
}
}
if
(
String
.
class
==
fieldType
)
{
if
(
attr
.
isArea
()){
// 区域字段单独处理
continue
;
}
else
if
(
String
.
class
==
fieldType
)
{
field
.
set
(
data
,
c
);
field
.
set
(
data
,
c
);
}
else
if
(
BigDecimal
.
class
==
fieldType
)
{
}
else
if
(
BigDecimal
.
class
==
fieldType
)
{
c
=
c
.
indexOf
(
'%'
)
!=
-
1
?
c
.
replace
(
"%"
,
""
)
:
c
;
c
=
c
.
indexOf
(
'%'
)
!=
-
1
?
c
.
replace
(
"%"
,
""
)
:
c
;
...
@@ -363,6 +365,11 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -363,6 +365,11 @@ public class ExcelUtil <T> implements Serializable {
}
}
}
}
}
}
if
(
Common
.
isNotNull
(
mapArea
)){
for
(
Map
.
Entry
<
String
,
Field
>
entry:
mapArea
.
entrySet
()){
entry
.
getValue
().
set
(
data
,
entry
.
getKey
());
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()
+
":"
+
c
.
trim
()
+
"校验异常,请联系管理人员"
),
errorTemp
);
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()
+
":"
+
c
.
trim
()
+
"校验异常,请联系管理人员"
),
errorTemp
);
}
finally
{
}
finally
{
...
@@ -432,12 +439,12 @@ public class ExcelUtil <T> implements Serializable {
...
@@ -432,12 +439,12 @@ public class ExcelUtil <T> implements Serializable {
}
}
return
propertyValue
;
return
propertyValue
;
}
}
private
String
getAreaLabel
(
String
c
,
ExcelAttribute
attr
)
{
private
String
getAreaLabel
(
String
c
)
{
return
(
String
)
RedisUtil
.
redis
.
opsForValue
().
get
(
c
);
return
(
String
)
RedisUtil
.
redis
.
opsForValue
().
get
(
c
);
}
}
private
String
getAreaValue
(
String
c
,
String
tempStr
,
ExcelAttribute
attr
,
Integer
rowNum
,
ErrorMessage
errorTemp
)
{
private
String
getAreaValue
(
String
c
,
String
tempStr
,
ExcelAttribute
attr
,
Integer
rowNum
,
ErrorMessage
errorTemp
)
{
tempStr
=
(
String
)
RedisUtil
.
redis
.
opsForValue
().
get
(
c
);
tempStr
=
String
.
valueOf
(
RedisUtil
.
redis
.
opsForValue
().
get
(
c
)
);
if
(
Common
.
isEmpty
(
tempStr
)){
if
(
Common
.
isEmpty
(
tempStr
)){
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()
+
":"
+
c
.
trim
()
+
"校验异常,请联系管理人员"
),
errorTemp
);
errorMessageHashMap
=
initErrorMessage
(
errorMessageHashMap
,
new
ErrorMessage
(
rowNum
,
attr
.
name
()
+
":"
+
c
.
trim
()
+
"校验异常,请联系管理人员"
),
errorTemp
);
return
CommonConstants
.
EMPTY_STRING
;
return
CommonConstants
.
EMPTY_STRING
;
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/init/DictItemRedisInit.java
View file @
827b9246
...
@@ -49,15 +49,13 @@ public class DictItemRedisInit {
...
@@ -49,15 +49,13 @@ public class DictItemRedisInit {
if
(
Common
.
isNotNull
(
allAreas
)){
if
(
Common
.
isNotNull
(
allAreas
)){
Map
<
String
,
SysArea
>
areaMap
=
new
HashMap
<>();
Map
<
String
,
SysArea
>
areaMap
=
new
HashMap
<>();
for
(
SysArea
area:
allAreas
){
for
(
SysArea
area:
allAreas
){
redisUtil
.
set
(
"area_"
+
area
.
getId
()
redisUtil
.
set
(
"area_"
+
area
.
getId
(),
area
.
getAreaName
());
+
CommonConstants
.
DOWN_LINE_STRING
+(
Common
.
isEmpty
(
area
.
getParentId
())?
"0"
:
area
.
getParentId
()),
area
.
getAreaName
());
areaMap
.
put
(
area
.
getId
().
toString
(),
area
);
areaMap
.
put
(
area
.
getId
().
toString
(),
area
);
}
}
SysArea
temp
;
SysArea
temp
;
for
(
SysArea
area:
allAreas
){
for
(
SysArea
area:
allAreas
){
if
(
Common
.
isNotNull
(
area
.
getParentId
())
&&
area
.
getParentId
().
intValue
()
>
0
){
if
(
Common
.
isNotNull
(
area
.
getParentId
())
&&
area
.
getParentId
().
intValue
()
>
0
){
temp
=
areaMap
.
get
(
area
.
getParentId
());
temp
=
areaMap
.
get
(
area
.
getParentId
()
.
toString
()
);
redisUtil
.
set
(
"area_"
+
area
.
getAreaName
()
redisUtil
.
set
(
"area_"
+
area
.
getAreaName
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
DOWN_LINE_STRING
+(
Common
.
isNotNull
(
temp
)?
temp
.
getAreaName
():
""
),
area
.
getId
());
+(
Common
.
isNotNull
(
temp
)?
temp
.
getAreaName
():
""
),
area
.
getId
());
...
...
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