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
e3f75496
Commit
e3f75496
authored
Jul 08, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
a7077194
47180616
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
140 additions
and
47 deletions
+140
-47
EmployeeXProjectVO.java
...fu/cloud/plus/v1/yifu/archives/vo/EmployeeXProjectVO.java
+2
-2
TElecEmployeeInfoController.java
...yifu/archives/controller/TElecEmployeeInfoController.java
+1
-1
TElecEmployeeInfoService.java
...us/v1/yifu/archives/service/TElecEmployeeInfoService.java
+1
-1
TElecEmployeeInfoServiceImpl.java
...u/archives/service/impl/TElecEmployeeInfoServiceImpl.java
+17
-8
TEmpBadRecordServiceImpl.java
.../yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
+2
-2
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+99
-27
application-test.yml
...yifu-archives-biz/src/main/resources/application-test.yml
+18
-6
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeXProjectVO.java
View file @
e3f75496
...
@@ -78,7 +78,7 @@ public class EmployeeXProjectVO extends RowIndex implements Serializable {
...
@@ -78,7 +78,7 @@ public class EmployeeXProjectVO extends RowIndex implements Serializable {
* 是否同步减档(0否;1是)
* 是否同步减档(0否;1是)
*/
*/
@ExcelProperty
(
value
=
"是否同步减档"
)
@ExcelProperty
(
value
=
"是否同步减档"
)
@NotNull
(
message
=
"是否同步减档不能为空"
)
//
@NotNull(message = "是否同步减档不能为空")
@ExcelAttribute
(
name
=
"是否同步减档"
,
isNotEmpty
=
true
,
errorInfo
=
"是否同步减档不能为空"
,
maxLength
=
1
)
//
@ExcelAttribute(name = "是否同步减档",isNotEmpty = true, errorInfo = "是否同步减档不能为空",maxLength = 1)
private
String
isLeaveEmployee
;
private
String
isLeaveEmployee
;
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TElecEmployeeInfoController.java
View file @
e3f75496
...
@@ -129,7 +129,7 @@ public class TElecEmployeeInfoController {
...
@@ -129,7 +129,7 @@ public class TElecEmployeeInfoController {
@PostMapping
(
"/importZip"
)
@PostMapping
(
"/importZip"
)
@Operation
(
summary
=
"批量导入电子档案"
,
description
=
"批量导入电子档案"
)
@Operation
(
summary
=
"批量导入电子档案"
,
description
=
"批量导入电子档案"
)
@SysLog
(
"批量导入电子档案"
)
@SysLog
(
"批量导入电子档案"
)
public
R
<
Boolean
>
importZip
(
@RequestBody
MultipartFile
file
)
{
public
R
importZip
(
@RequestBody
MultipartFile
file
)
{
return
this
.
tElecEmployeeInfoService
.
importZip
(
file
);
return
this
.
tElecEmployeeInfoService
.
importZip
(
file
);
}
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TElecEmployeeInfoService.java
View file @
e3f75496
...
@@ -41,7 +41,7 @@ public interface TElecEmployeeInfoService extends IService<TElecEmployeeInfo> {
...
@@ -41,7 +41,7 @@ public interface TElecEmployeeInfoService extends IService<TElecEmployeeInfo> {
* @author: huyc
* @author: huyc
* @date: 2022/6/24
* @date: 2022/6/24
*/
*/
R
<
Boolean
>
importZip
(
MultipartFile
file
);
R
importZip
(
MultipartFile
file
);
/**
/**
* @description: 通过身份证号查询人员档案
* @description: 通过身份证号查询人员档案
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TElecEmployeeInfoServiceImpl.java
View file @
e3f75496
...
@@ -46,6 +46,7 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -46,6 +46,7 @@ import org.springframework.web.multipart.MultipartFile;
import
org.springframework.web.multipart.commons.CommonsMultipartFile
;
import
org.springframework.web.multipart.commons.CommonsMultipartFile
;
import
java.io.*
;
import
java.io.*
;
import
java.util.Arrays
;
import
java.util.Enumeration
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -90,7 +91,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
...
@@ -90,7 +91,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
* @date: 2022/6/27
* @date: 2022/6/27
*/
*/
@Override
@Override
public
R
<
Boolean
>
importZip
(
MultipartFile
zipFile
){
public
R
importZip
(
MultipartFile
zipFile
){
try
{
try
{
String
pathName
=
ResourceUtils
.
getURL
(
"classpath:"
).
getPath
()
+
"unloap/"
;
String
pathName
=
ResourceUtils
.
getURL
(
"classpath:"
).
getPath
()
+
"unloap/"
;
String
dec
=
ResourceUtils
.
getURL
(
"classpath:"
).
getPath
()
+
"unloap/"
;
String
dec
=
ResourceUtils
.
getURL
(
"classpath:"
).
getPath
()
+
"unloap/"
;
...
@@ -107,9 +108,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
...
@@ -107,9 +108,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
File
file
=
new
File
(
pathName
);
File
file
=
new
File
(
pathName
);
zipFile
.
transferTo
(
file
);
zipFile
.
transferTo
(
file
);
// 获取解压出来的文件名 不带后缀
// 获取解压出来的文件名 不带后缀
unZip
(
file
,
dec
);
return
unZip
(
file
,
dec
);
//解析完成删除本次解析中生成的文件 删除此目录下的所有文件
deleteFolder
(
dec
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -121,6 +120,9 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
...
@@ -121,6 +120,9 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)).
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)).
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isNotNull
(
tEmployeeInfo
))
{
if
(
Common
.
isNotNull
(
tEmployeeInfo
))
{
if
(
CommonConstants
.
ONE_INT
==
tEmployeeInfo
.
getFileStatus
())
{
return
R
.
failed
(
"身份证号对应的档案为已减档"
);
}
return
R
.
ok
(
tEmployeeInfo
);
return
R
.
ok
(
tEmployeeInfo
);
}
}
return
R
.
failed
(
"未找到身份证号对应的档案信息"
);
return
R
.
failed
(
"未找到身份证号对应的档案信息"
);
...
@@ -196,18 +198,18 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
...
@@ -196,18 +198,18 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
fos
.
write
(
buf
,
0
,
len
);
fos
.
write
(
buf
,
0
,
len
);
}
}
R
<
FileVo
>
fileVo
=
fileUploadService
.
uploadImg
(
fileCovertMultipartFile
(
targetFile
),
""
,
CommonConstants
.
EIGHT_INT
,
""
);
if
(
empInfo
.
length
()
>
empInfo
.
lastIndexOf
(
"/"
)
+
1
)
{
if
(
empInfo
.
length
()
>
empInfo
.
lastIndexOf
(
"/"
)
+
1
)
{
String
idCard
=
empInfo
.
substring
(
0
,
empInfo
.
indexOf
(
"/"
));
String
idCard
=
empInfo
.
substring
(
0
,
empInfo
.
indexOf
(
"/"
));
String
dataType
=
empInfo
.
substring
(
empInfo
.
indexOf
(
"/"
)
+
1
,
empInfo
.
lastIndexOf
(
"/"
));
String
dataType
=
empInfo
.
substring
(
empInfo
.
indexOf
(
"/"
)
+
1
,
empInfo
.
lastIndexOf
(
"/"
));
String
empName
=
""
;
String
empName
=
""
;
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)));
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)).
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isNotNull
(
tEmployeeInfo
))
{
if
(
Common
.
isNotNull
(
tEmployeeInfo
))
{
empName
=
tEmployeeInfo
.
getEmpName
();
empName
=
tEmployeeInfo
.
getEmpName
();
}
else
{
return
R
.
failed
(
"未找到身份证对应的档案信息,身份证号:"
+
idCard
);
}
}
String
attachInfo
=
empInfo
.
substring
(
empInfo
.
lastIndexOf
(
"/"
)+
1
,
empInfo
.
length
());
TElecEmployeeInfo
tElecEmployeeInfo
=
new
TElecEmployeeInfo
();
TElecEmployeeInfo
tElecEmployeeInfo
=
new
TElecEmployeeInfo
();
tElecEmployeeInfo
.
setEmpIdcard
(
idCard
);
tElecEmployeeInfo
.
setEmpIdcard
(
idCard
);
tElecEmployeeInfo
.
setEmpName
(
empName
);
tElecEmployeeInfo
.
setEmpName
(
empName
);
...
@@ -215,7 +217,14 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
...
@@ -215,7 +217,14 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
tElecEmployeeInfo
.
setDataType
(
elecTypeMap
.
get
(
dataType
));
tElecEmployeeInfo
.
setDataType
(
elecTypeMap
.
get
(
dataType
));
}
}
this
.
save
(
tElecEmployeeInfo
);
this
.
save
(
tElecEmployeeInfo
);
//文件上传并保存附件信息
R
<
FileVo
>
fileVo
=
fileUploadService
.
uploadImg
(
fileCovertMultipartFile
(
targetFile
),
""
,
CommonConstants
.
EIGHT_INT
,
""
);
String
id
=
fileVo
.
getData
().
getUid
();
attaInfoMapper
.
updateDomainId
(
tElecEmployeeInfo
.
getId
(),
Arrays
.
asList
(
id
));
}
}
//解析完成删除本次解析中生成的文件 删除此目录下的所有文件
deleteFolder
(
destDirPath
);
// 关流顺序,先打开的后关闭
// 关流顺序,先打开的后关闭
fos
.
close
();
fos
.
close
();
is
.
close
();
is
.
close
();
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpBadRecordServiceImpl.java
View file @
e3f75496
...
@@ -204,7 +204,7 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
...
@@ -204,7 +204,7 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
@Override
@Override
public
void
listExport
(
HttpServletResponse
response
,
EmpBadRecordSearchVo
searchVo
)
{
public
void
listExport
(
HttpServletResponse
response
,
EmpBadRecordSearchVo
searchVo
)
{
String
fileName
=
"不良记录批量导出"
+
LocalDateTime
.
now
()
+
".xlsx"
;
String
fileName
=
"不良记录批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
//获取要导出的列表
List
<
TEmpBadRecord
>
list
=
new
ArrayList
<>();
List
<
TEmpBadRecord
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
long
count
=
noPageCountDiy
(
searchVo
);
...
@@ -213,7 +213,7 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
...
@@ -213,7 +213,7 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
out
=
response
.
getOutputStream
();
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename
*=utf-8'zh_cn'
"
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename
=
"
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TEmpBadRecord
.
class
).
build
();
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TEmpBadRecord
.
class
).
build
();
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
e3f75496
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-biz/src/main/resources/application-test.yml
View file @
e3f75496
...
@@ -16,11 +16,23 @@ spring:
...
@@ -16,11 +16,23 @@ spring:
password
:
yf_zsk
password
:
yf_zsk
#url: jdbc:mysql://127.0.0.1:3306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
#url: jdbc:mysql://127.0.0.1:3306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url
:
jdbc:mysql://192.168.1.65:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url
:
jdbc:mysql://192.168.1.65:22306/mvp_archives?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
servlet
:
multipart
:
location
:
/data/tmp
#法大大生产环境
#fdd:
# app-id: FA05480470
# app-key: GTYGFVFOYUYP3ONRHY91EK8IEAK5L9E7
# server-url: https://openapi.fadada.com/api/v3/
# connect-timeout: 10000
# read-timeout: 10000
# hrms-url: http://2349f6a315.wicp.vip:39468/v1.0/invoke/yifu-archives/method
#法大大沙箱环境配置
fdd
:
fdd
:
app-id
:
FA05480470
appId
:
FA38847543
app-key
:
GTYGFVFOYUYP3ONRHY91EK8IEAK5L9E7
appKey
:
HOQBDZAEMEILJM6WU9LY0OPFHNFAMVTQ
server-url
:
https://openapi.fadada.com/api/v3/
serverUrl
:
https://sandboxapi.fadada.com/api/v3/
connect-timeout
:
10000
connectTimeout
:
10000
read-timeout
:
10000
readTimeout
:
10000
hrms-url
:
http://2349f6a315.wicp.vip:39468/v1.0/invoke/yifu-archives/method/fdd/notifyUrl
hrmsUrl
:
http://2349f6a315.wicp.vip:39468/v1.0/invoke/yifu-archives/method
\ No newline at end of file
\ No newline at end of file
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