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
f3c6dda7
Commit
f3c6dda7
authored
Feb 22, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实缴导入校验项目
parent
7a82d9e1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
48 deletions
+53
-48
TElecEmployeeInfoServiceImpl.java
...u/archives/service/impl/TElecEmployeeInfoServiceImpl.java
+31
-36
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+12
-7
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+10
-5
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TElecEmployeeInfoServiceImpl.java
View file @
f3c6dda7
...
@@ -28,12 +28,12 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TElecEmployeeInfoMapper;
...
@@ -28,12 +28,12 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TElecEmployeeInfoMapper;
import
com.yifu.cloud.plus.v1.yifu.archives.service.FileUploadService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.FileUploadService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TElecEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TElecEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
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.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.fileupload.FileItem
;
import
org.apache.commons.fileupload.FileItem
;
import
org.apache.commons.fileupload.FileItemFactory
;
import
org.apache.commons.fileupload.FileItemFactory
;
...
@@ -145,19 +145,19 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
...
@@ -145,19 +145,19 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
*/
*/
private
R
unZip
(
File
srcFile
,
String
destDirPath
)
throws
RuntimeException
{
private
R
unZip
(
File
srcFile
,
String
destDirPath
)
throws
RuntimeException
{
// 调用字典服务,渲染字典值
Map
<
String
,
String
>
elecTypeMap
=
new
HashMap
<>();
R
<
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>>
dictR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
// 渲染字典值
,
"/dict/inner/getDictToLable"
,
null
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
()
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>
dictMap
;
.
get
(
CacheConstants
.
DICT_DETAILS
// 电子档案类型
+
CommonConstants
.
COLON_STRING
Map
<
String
,
Map
<
String
,
String
>>
elecTypeMapData
;
+
"literature_types"
);
Map
<
String
,
String
>
elecTypeMap
;
if
(
Common
.
isNotNull
(
dicObj
))
{
if
(
dictR
==
null
)
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
dicObj
.
entrySet
())
{
elecTypeMap
.
put
(
entry
.
getValue
(),
entry
.
getKey
());
}
}
if
(!
elecTypeMap
.
isEmpty
())
{
return
R
.
failed
(
"获取字典失败!"
);
return
R
.
failed
(
"获取字典失败!"
);
}
else
{
dictMap
=
dictR
.
getData
();
elecTypeMapData
=
dictMap
.
get
(
"data"
);
elecTypeMap
=
elecTypeMapData
.
get
(
"literature_types"
);
}
}
// 判断源文件是否存在
// 判断源文件是否存在
if
(!
srcFile
.
exists
())
{
if
(!
srcFile
.
exists
())
{
...
@@ -173,15 +173,18 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
...
@@ -173,15 +173,18 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
Set
<
String
>
infoList
=
new
HashSet
<>();
Set
<
String
>
infoList
=
new
HashSet
<>();
Set
<
String
>
idCardList
=
new
HashSet
<>();
Set
<
String
>
idCardList
=
new
HashSet
<>();
Set
<
String
>
cardType
=
new
HashSet
<>();
Set
<
String
>
cardType
=
new
HashSet
<>();
TEmployeeInfo
tEmployeeInfo
;
ZipEntry
entry
;
while
(
entriesCheck
.
hasMoreElements
())
{
while
(
entriesCheck
.
hasMoreElements
())
{
ZipEntry
entry
=
(
ZipEntry
)
entriesCheck
.
nextElement
();
entry
=
(
ZipEntry
)
entriesCheck
.
nextElement
();
//添加进filesName
//添加进filesName
String
empInfo
=
entry
.
getName
();
String
empInfo
=
entry
.
getName
();
infoList
.
add
(
empInfo
);
infoList
.
add
(
empInfo
);
String
dataType
=
""
;
String
dataType
=
""
;
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
(
"/"
));
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
tEmployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)).
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)).
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
));
.
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
));
...
@@ -191,7 +194,6 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
...
@@ -191,7 +194,6 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
idCardList
.
add
(
idCard
);
idCardList
.
add
(
idCard
);
if
(
empInfo
.
length
()
>
20
)
{
if
(
empInfo
.
length
()
>
20
)
{
dataType
=
empInfo
.
substring
(
empInfo
.
indexOf
(
"/"
)
+
1
,
empInfo
.
lastIndexOf
(
"/"
));
dataType
=
empInfo
.
substring
(
empInfo
.
indexOf
(
"/"
)
+
1
,
empInfo
.
lastIndexOf
(
"/"
));
if
(
Common
.
isNotNull
(
elecTypeMap
))
{
if
(!
Common
.
isNotNull
(
elecTypeMap
.
get
(
dataType
)))
{
if
(!
Common
.
isNotNull
(
elecTypeMap
.
get
(
dataType
)))
{
return
R
.
failed
(
"资料类型错误:"
+
dataType
);
return
R
.
failed
(
"资料类型错误:"
+
dataType
);
}
}
...
@@ -199,26 +201,23 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
...
@@ -199,26 +201,23 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
}
}
}
}
}
}
}
for
(
String
idCarInfo
:
idCardList
)
{
for
(
String
idCarInfo
:
idCardList
)
{
if
(
!
infoList
.
stream
().
any
Match
(
e
->
containsCheckTwo
(
e
,
idCarInfo
)))
{
if
(
infoList
.
stream
().
none
Match
(
e
->
containsCheckTwo
(
e
,
idCarInfo
)))
{
return
R
.
failed
(
idCarInfo
+
":"
+
"证件数据不可为空"
);
return
R
.
failed
(
idCarInfo
+
":"
+
"证件数据不可为空"
);
}
}
}
}
if
(
cardType
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
if
(
cardType
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
for
(
String
typeInfo
:
cardType
)
{
for
(
String
typeInfo
:
cardType
)
{
if
(
!
infoList
.
stream
().
any
Match
(
e
->
containsCheckOne
(
e
,
typeInfo
)))
{
if
(
infoList
.
stream
().
none
Match
(
e
->
containsCheckOne
(
e
,
typeInfo
)))
{
return
R
.
failed
(
typeInfo
+
":"
+
"证件数据不可为空"
);
return
R
.
failed
(
typeInfo
+
":"
+
"证件数据不可为空"
);
}
}
}
}
}
}
Map
<
String
,
String
>
insMap
=
new
HashMap
<>();
Map
<
String
,
String
>
insMap
=
new
HashMap
<>();
TEmployeeInfo
employeeInfo
;
List
<
TElecEmployeeInfo
>
infolist
=
new
ArrayList
<>();
List
<
String
>
list
=
new
ArrayList
<>();
while
(
entries
.
hasMoreElements
())
{
while
(
entries
.
hasMoreElements
())
{
ZipEntry
entry
=
(
ZipEntry
)
entries
.
nextElement
();
entry
=
(
ZipEntry
)
entries
.
nextElement
();
//添加进filesName
//添加进filesName
String
empInfo
=
entry
.
getName
();
String
empInfo
=
entry
.
getName
();
// 如果是文件夹,就创建个文件夹
// 如果是文件夹,就创建个文件夹
...
@@ -249,26 +248,22 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
...
@@ -249,26 +248,22 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
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
tE
mployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
e
mployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)).
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)).
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isNotNull
(
tE
mployeeInfo
))
{
if
(
Common
.
isNotNull
(
e
mployeeInfo
))
{
empName
=
tE
mployeeInfo
.
getEmpName
();
empName
=
e
mployeeInfo
.
getEmpName
();
}
}
tElecEmployeeInfo
.
setEmpIdcard
(
idCard
);
tElecEmployeeInfo
.
setEmpIdcard
(
idCard
);
tElecEmployeeInfo
.
setEmpName
(
empName
);
tElecEmployeeInfo
.
setEmpName
(
empName
);
if
(
Common
.
isNotNull
(
elecTypeMap
))
{
if
(
Common
.
isNotNull
(
elecTypeMap
.
get
(
dataType
)))
{
if
(
Common
.
isNotNull
(
elecTypeMap
.
get
(
dataType
)))
{
tElecEmployeeInfo
.
setDataType
(
elecTypeMap
.
get
(
dataType
));
tElecEmployeeInfo
.
setDataType
(
elecTypeMap
.
get
(
dataType
));
}
}
}
String
id
=
insMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
);
String
id
=
insMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
);
if
(
Common
.
isEmpty
(
id
))
{
if
(
Common
.
isEmpty
(
id
))
{
infolist
.
add
(
tElecEmployeeInfo
);
this
.
save
(
tElecEmployeeInfo
);
this
.
save
(
tElecEmployeeInfo
);
insMap
.
put
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
,
tElecEmployeeInfo
.
getId
());
insMap
.
put
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
,
tElecEmployeeInfo
.
getId
());
}
}
list
.
add
(
insMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
));
fileUploadService
.
uploadImg
(
fileCovertMultipartFile
(
targetFile
),
""
,
CommonConstants
.
EIGHT_INT
,
insMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
));
fileUploadService
.
uploadImg
(
fileCovertMultipartFile
(
targetFile
),
""
,
CommonConstants
.
EIGHT_INT
,
insMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
));
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
f3c6dda7
...
@@ -159,6 +159,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
...
@@ -159,6 +159,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
List
<
TEmployeeProject
>
updateList
=
new
ArrayList
<>();
List
<
TEmployeeProject
>
updateList
=
new
ArrayList
<>();
Set
<
String
>
errorMsg
;
Set
<
String
>
errorMsg
;
//对象声明
TEmpChangeInfoVO
excel
;
TSettleDomain
tSettleDomain
;
TEmployeeProject
employeeProject
;
TEmployeeProject
updateTEmployeePro
;
TEmployeeProject
tEmployeeProjectOld
;
// 执行数据插入操作 组装
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
// 已有验证报错直接下一个
// 已有验证报错直接下一个
...
@@ -166,7 +172,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
...
@@ -166,7 +172,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
continue
;
continue
;
}
}
errorMsg
=
new
HashSet
<>();
errorMsg
=
new
HashSet
<>();
TEmpChangeInfoVO
excel
=
excelVOList
.
get
(
i
);
excel
=
excelVOList
.
get
(
i
);
excel
.
setUnsettleDeal
(
CommonConstants
.
IS_NO_CHANGE
);
excel
.
setUnsettleDeal
(
CommonConstants
.
IS_NO_CHANGE
);
if
(
Common
.
isNotNull
(
excel
.
getChangeStartMonth
())
&&
excel
.
getChangeStartMonth
().
length
()
>
CommonConstants
.
dingleDigitIntArray
[
6
])
{
if
(
Common
.
isNotNull
(
excel
.
getChangeStartMonth
())
&&
excel
.
getChangeStartMonth
().
length
()
>
CommonConstants
.
dingleDigitIntArray
[
6
])
{
errorMsg
.
add
(
"划转起始月长度不能超过6位"
);
errorMsg
.
add
(
"划转起始月长度不能超过6位"
);
...
@@ -184,7 +190,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
...
@@ -184,7 +190,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
}
//项目编码校验
//项目编码校验
TSettleDomain
tSettleDomain
=
tSettleDomainMapper
.
selectOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
tSettleDomain
=
tSettleDomainMapper
.
selectOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
excel
.
getNewSettleCode
())
.
eq
(
TSettleDomain:
:
getDepartNo
,
excel
.
getNewSettleCode
())
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
));
...
@@ -193,17 +199,17 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
...
@@ -193,17 +199,17 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
}
//待划转员工已在目标项目下不可划转
//待划转员工已在目标项目下不可划转
TEmployeeProject
tE
mployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
e
mployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getNewSettleCode
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getNewSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
tE
mployeeProject
))
{
if
(
Common
.
isNotNull
(
e
mployeeProject
))
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_NEW_SEARCH_NOT_EXIST
,
excel
.
getNewSettleCode
()));
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_NEW_SEARCH_NOT_EXIST
,
excel
.
getNewSettleCode
()));
}
}
// 数据合法情况
// 数据合法情况
if
(
CollUtil
.
isEmpty
(
errorMsg
))
{
if
(
CollUtil
.
isEmpty
(
errorMsg
))
{
//划转,更新项目信息
//划转,更新项目信息
TEmployeeProject
updateTEmployeePro
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
updateTEmployeePro
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
updateTEmployeePro
))
{
if
(
Common
.
isNotNull
(
updateTEmployeePro
))
{
...
@@ -214,7 +220,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
...
@@ -214,7 +220,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
if
(
CommonConstants
.
ONE_INT
==
updateTEmployeePro
.
getProjectStatus
())
{
if
(
CommonConstants
.
ONE_INT
==
updateTEmployeePro
.
getProjectStatus
())
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_DELETE_EXIT
,
excel
.
getOldSettleCode
()));
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_DELETE_EXIT
,
excel
.
getOldSettleCode
()));
}
else
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
}
else
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
TEmployeeProject
tEmployeeProjectOld
=
tEmployeeProjectService
.
getById
(
updateTEmployeePro
.
getId
());
tEmployeeProjectOld
=
tEmployeeProjectService
.
getById
(
updateTEmployeePro
.
getId
());
updateTEmployeePro
.
setDeptNo
(
tSettleDomain
.
getDepartNo
());
updateTEmployeePro
.
setDeptNo
(
tSettleDomain
.
getDepartNo
());
updateTEmployeePro
.
setDeptId
(
tSettleDomain
.
getId
());
updateTEmployeePro
.
setDeptId
(
tSettleDomain
.
getId
());
updateTEmployeePro
.
setDeptName
(
tSettleDomain
.
getDepartName
());
updateTEmployeePro
.
setDeptName
(
tSettleDomain
.
getDepartName
());
...
@@ -300,7 +306,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
...
@@ -300,7 +306,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
*/
*/
@Override
@Override
public
R
<
List
<
TCustomerInfo
>>
getAllUint
(
String
customerName
)
{
public
R
<
List
<
TCustomerInfo
>>
getAllUint
(
String
customerName
)
{
//List<TCustomerInfo> list = tCustomerInfoService.list(Wrappers.<TCustomerInfo>query().lambda().eq(TCustomerInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
List
<
TCustomerInfo
>
list
=
tCustomerInfoService
.
getAllUnit
(
customerName
);
List
<
TCustomerInfo
>
list
=
tCustomerInfoService
.
getAllUnit
(
customerName
);
return
R
.
ok
(
list
);
return
R
.
ok
(
list
);
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
f3c6dda7
...
@@ -949,9 +949,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -949,9 +949,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
// 新老项目档案List
// 新老项目档案List
List
<
EmployeeProjectNewOldVO
>
updateProjectList
=
new
ArrayList
<>();
List
<
EmployeeProjectNewOldVO
>
updateProjectList
=
new
ArrayList
<>();
EmployeeProjectUpdateVO
excel
;
TEmployeeProject
tEmployeeProject
;
TEmployeeInfo
tEmployeeInfo
;
TEmployeeProject
tEmployeeProjectOld
;
// 执行数据插入操作 组装
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
EmployeeProjectUpdateVO
excel
=
excelVOList
.
get
(
i
);
excel
=
excelVOList
.
get
(
i
);
String
checkCount
=
excel
.
getEmpIdcard
().
concat
(
excel
.
getDeptNo
());
String
checkCount
=
excel
.
getEmpIdcard
().
concat
(
excel
.
getDeptNo
());
if
(
Common
.
isNotNull
(
checkCountMap
.
get
(
checkCount
)))
{
if
(
Common
.
isNotNull
(
checkCountMap
.
get
(
checkCount
)))
{
...
@@ -960,7 +964,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -960,7 +964,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
checkCountMap
.
put
(
checkCount
,
i
+
2
);
checkCountMap
.
put
(
checkCount
,
i
+
2
);
}
}
//根据身份证和项目编码获取项目档案
//根据身份证和项目编码获取项目档案
TEmployeeProject
tEmployeeProject
=
this
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
tEmployeeProject
=
this
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
...
@@ -971,13 +975,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -971,13 +975,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_EMP_DELETE_ERROR
)));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_EMP_DELETE_ERROR
)));
}
else
{
}
else
{
updateExcelProj
(
excel
,
updateList
,
tEmployeeProject
);
updateExcelProj
(
excel
,
updateList
,
tEmployeeProject
);
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
newOldProject
=
new
EmployeeProjectNewOldVO
();
newOldProject
=
new
EmployeeProjectNewOldVO
();
newOldProject
.
setOldProjectEmployee
(
tEmployeeProjectOld
);
newOldProject
.
setOldProjectEmployee
(
tEmployeeProjectOld
);
newOldProject
.
setNewProjectEmployee
(
tEmployeeProject
);
newOldProject
.
setNewProjectEmployee
(
tEmployeeProject
);
updateProjectList
.
add
(
newOldProject
);
updateProjectList
.
add
(
newOldProject
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
...
@@ -1065,6 +1069,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -1065,6 +1069,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
}
}
if
(
Common
.
isNotEmpty
(
list
))
{
if
(
Common
.
isNotEmpty
(
list
))
{
TEmployeeInfo
tEmployeeInfo
;
int
i
=
0
;
int
i
=
0
;
for
(
TEmployeeProject
delProject
:
list
)
{
for
(
TEmployeeProject
delProject
:
list
)
{
++
i
;
++
i
;
...
@@ -1072,7 +1077,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -1072,7 +1077,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if
(
CommonConstants
.
dingleDigitIntArray
[
0
]
==
delProject
.
getStatus
())
{
if
(
CommonConstants
.
dingleDigitIntArray
[
0
]
==
delProject
.
getStatus
())
{
delProject
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
delProject
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
updList
.
add
(
delProject
);
updList
.
add
(
delProject
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
delProject
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
delProject
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
infoUpdList
.
add
(
tEmployeeInfo
);
infoUpdList
.
add
(
tEmployeeInfo
);
...
...
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