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
171f82f3
You need to sign in or sign up before continuing.
Commit
171f82f3
authored
Feb 24, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电子档案文件夹名称格式修改
parent
ef2eb51c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
TElecEmployeeInfoServiceImpl.java
...u/archives/service/impl/TElecEmployeeInfoServiceImpl.java
+15
-14
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TElecEmployeeInfoServiceImpl.java
View file @
171f82f3
...
...
@@ -156,7 +156,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
elecTypeMap
.
put
(
entry
.
getValue
(),
entry
.
getKey
());
}
}
if
(
!
elecTypeMap
.
isEmpty
())
{
if
(
elecTypeMap
.
isEmpty
())
{
return
R
.
failed
(
"获取字典失败!"
);
}
// 判断源文件是否存在
...
...
@@ -176,14 +176,19 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
TEmployeeInfo
tEmployeeInfo
;
ZipEntry
entry
;
String
idCard
;
String
empInfo
;
while
(
entriesCheck
.
hasMoreElements
())
{
entry
=
(
ZipEntry
)
entriesCheck
.
nextElement
();
//添加进filesName
String
empInfo
=
entry
.
getName
();
empInfo
=
entry
.
getName
();
infoList
.
add
(
empInfo
);
String
dataType
=
""
;
if
(
empInfo
.
length
()
==
empInfo
.
lastIndexOf
(
"/"
)
+
1
)
{
String
idCard
=
empInfo
.
substring
(
0
,
empInfo
.
indexOf
(
"/"
));
if
(!
empInfo
.
contains
(
"-"
))
{
return
R
.
failed
(
"请使用正确的文件夹命名格式:身份证-员工姓名"
);
}
idCard
=
empInfo
.
substring
(
0
,
empInfo
.
indexOf
(
"-"
));
tEmployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)).
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
...
...
@@ -197,7 +202,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
if
(!
Common
.
isNotNull
(
elecTypeMap
.
get
(
dataType
)))
{
return
R
.
failed
(
"资料类型错误:"
+
dataType
);
}
cardType
.
add
(
idCard
+
"
/
"
+
dataType
);
cardType
.
add
(
idCard
+
"
_
"
+
dataType
);
}
}
}
...
...
@@ -219,7 +224,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
while
(
entries
.
hasMoreElements
())
{
entry
=
(
ZipEntry
)
entries
.
nextElement
();
//添加进filesName
String
empInfo
=
entry
.
getName
();
empInfo
=
entry
.
getName
();
// 如果是文件夹,就创建个文件夹
if
(
entry
.
isDirectory
())
{
String
dirPath
=
destDirPath
+
"/"
+
entry
.
getName
();
...
...
@@ -245,7 +250,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
TElecEmployeeInfo
tElecEmployeeInfo
=
new
TElecEmployeeInfo
();
if
(
empInfo
.
length
()
>
empInfo
.
lastIndexOf
(
"/"
)
+
1
)
{
String
idCard
=
empInfo
.
substring
(
0
,
empInfo
.
indexOf
(
"/
"
));
idCard
=
empInfo
.
substring
(
0
,
empInfo
.
indexOf
(
"-
"
));
String
dataType
=
empInfo
.
substring
(
empInfo
.
indexOf
(
"/"
)
+
1
,
empInfo
.
lastIndexOf
(
"/"
));
String
empName
=
""
;
employeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
...
...
@@ -388,16 +393,12 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
}
public
boolean
containsCheckTwo
(
String
e
,
String
idCard
)
{
if
(
e
.
contains
(
idCard
)
&&
e
.
length
()
>
20
)
{
return
true
;
}
return
false
;
return
e
.
contains
(
idCard
)
&&
e
.
length
()
>
20
;
}
public
boolean
containsCheckOne
(
String
e
,
String
cardType
)
{
if
(
e
.
contains
(
cardType
)
&&
e
.
contains
(
CommonConstants
.
SPOT
))
{
return
true
;
}
return
false
;
String
empIdcard
=
cardType
.
substring
(
0
,
cardType
.
indexOf
(
"_"
));
String
fileName
=
cardType
.
substring
(
cardType
.
indexOf
(
"_"
)
+
1
,
cardType
.
length
());
return
e
.
contains
(
empIdcard
)
&&
e
.
contains
(
fileName
)
&&
e
.
contains
(
CommonConstants
.
SPOT
);
}
}
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