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
44e53e33
Commit
44e53e33
authored
Aug 15, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
划转和减项判断社保公积金状态修改
parent
6bf81332
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
77 deletions
+105
-77
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+9
-0
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+94
-75
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+1
-1
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+1
-1
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
44e53e33
...
...
@@ -89,6 +89,11 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
).
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
updateTEmployeeProject
))
{
if
(
updateTEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
]
||
updateTEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
return
R
.
failed
(
"人员在原项目中存在在途的服务,请先终止后,再进行划转"
);
}
TSettleDomain
tSettleDomain
=
tSettleDomainMapper
.
selectOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
tEmpChangeInfo
.
getDeptNo
()).
eq
(
TSettleDomain:
:
getDepartName
,
tEmpChangeInfo
.
getNewSettle
())
.
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
).
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
ZERO_STRING
));
...
...
@@ -172,6 +177,10 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
()).
eq
(
TEmployeeProject:
:
getDeptNo
,
excel
.
getOldSettleCode
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
updateTEmployeePro
))
{
if
(
updateTEmployeePro
.
getSocialStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
]
||
updateTEmployeePro
.
getFundStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
QT_PROJECT_CHANGE_NOT_EXIST
,
excel
.
getOldSettleCode
()));
}
if
(
CommonConstants
.
ONE_INT
==
updateTEmployeePro
.
getProjectStatus
())
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_DELETE_EXIT
,
excel
.
getOldSettleCode
()));
}
else
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
44e53e33
...
...
@@ -188,7 +188,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
check
.
setBankNo
(
tEmployeeProject
.
getBankNo
());
check
.
setIdNum
(
tEmployeeProject
.
getEmpIdcard
());
check
.
setName
(
tEmployeeProject
.
getEmpName
());
R
<
CheckBankNoVo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
R
<
CheckBankNoVo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNo"
,
check
,
CheckBankNoVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
CheckBankNoVo
vo
=
checkListR
.
getData
();
...
...
@@ -209,7 +210,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//获取项目和单位信息
TSettleDomain
tSettleDomain
=
tSettleDomainService
.
getOne
(
Wrappers
.<
TSettleDomain
>
query
().
lambda
()
.
eq
(
TSettleDomain:
:
getDepartNo
,
tEmployeeProject
.
getDeptNo
()).
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TSettleDomain:
:
getDepartNo
,
tEmployeeProject
.
getDeptNo
()).
eq
(
TSettleDomain:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TSettleDomain:
:
getStopFlag
,
CommonConstants
.
STATUS_NORMAL
));
if
(
Common
.
isNotNull
(
tSettleDomain
))
{
tEmployeeProject
.
setDeptId
(
tSettleDomain
.
getId
());
...
...
@@ -230,12 +232,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeProject
.
getEmpNatrue
()))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ZERO_STRING
);
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tEmployeeProject
.
getEmpNatrue
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeInfo
.
getEmpNatrue
()))
{
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tEmployeeProject
.
getEmpNatrue
())
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
tEmployeeInfo
.
getEmpNatrue
()))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ONE_STRING
);
}
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
().
intValue
()
+
CommonConstants
.
ONE_INT
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfoCompare
.
getId
(),
""
,
tEmployeeInfoCompare
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfoCompare
.
getId
(),
""
,
tEmployeeInfoCompare
,
tEmployeeInfo
);
return
R
.
ok
();
}
return
R
.
failed
(
"未在人员档案中查到身份信息"
);
...
...
@@ -292,9 +296,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfoCompare
.
getId
(),
""
,
tEmployeeInfoCompare
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfoCompare
.
getId
(),
""
,
tEmployeeInfoCompare
,
tEmployeeInfo
);
}
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
compareProject
,
newProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
compareProject
,
newProject
);
return
R
.
ok
(
flag
);
}
...
...
@@ -306,7 +312,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//对比对象
TEmployeeProject
compareProject
=
this
.
getById
(
id
);
if
(
tEmployeeProject
.
getInsuranceStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getSocialStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
if
(
tEmployeeProject
.
getInsuranceStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getSocialStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getFundStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
])
{
return
R
.
failed
(
"人员在该项目下存在进行中/未完结的服务,禁止删除"
);
...
...
@@ -317,7 +324,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
baseMapper
.
updateById
(
tEmployeeProject
);
//更新操作记录
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
compareProject
,
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
compareProject
,
tEmployeeProject
);
List
<
TEmployeeInfo
>
updList
=
new
ArrayList
<>();
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
...
...
@@ -347,7 +355,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
empId
);
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
0
]);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
empId
,
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
empId
,
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
}
else
if
(
Common
.
isEmpty
(
empId
)
&&
!
Common
.
isEmpty
(
empProId
))
{
//复项
tEmployeeProjectOld
=
this
.
getById
(
empProId
);
...
...
@@ -381,9 +390,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
+
CommonConstants
.
ONE_INT
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
}
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
empProId
,
tEmployeeProjectOld
,
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
empProId
,
tEmployeeProjectOld
,
tEmployeeProject
);
}
else
{
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
empId
);
tEmployeeProjectOld
=
this
.
getById
(
empProId
);
...
...
@@ -391,7 +402,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TEmployeeProject
tEmployeeProject
=
this
.
getById
(
empProId
);
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
0
]);
this
.
updateById
(
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
empProId
,
tEmployeeProjectOld
,
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
empProId
,
tEmployeeProjectOld
,
tEmployeeProject
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
empId
);
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
0
]);
...
...
@@ -415,7 +427,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
tEmployeeInfo
.
setProjectNum
(
CommonConstants
.
ONE_INT
);
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
empId
,
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
empId
,
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
}
}
else
{
return
R
.
failed
(
"传参为空!"
);
...
...
@@ -425,72 +438,72 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Override
public
R
deleteEmpPro
(
TEmployeeProject
tEmployeeProject
)
{
Long
count
=
this
.
count
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getId
,
tEmployeeProject
.
getId
())
.
eq
(
TEmployeeProject:
:
getInsuranceStatus
,
CommonConstants
.
dingleDigitIntArray
[
0
])
.
eq
(
TEmployeeProject:
:
getSocialStatus
,
CommonConstants
.
dingleDigitIntArray
[
0
])
.
eq
(
TEmployeeProject:
:
getFundStatus
,
CommonConstants
.
dingleDigitIntArray
[
0
]));
if
(
count
==
CommonConstants
.
ONE_INT
)
{
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
TEmployeeInfo
tEmployeeInfoOld
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
String
code
=
""
;
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeProject
.
setLeaveTime
(
LocalDateTime
.
now
());
this
.
updateById
(
tEmployeeProject
);
if
(
CommonConstants
.
ONE_INT
==
tEmployeeProject
.
getSocialStatus
()
||
CommonConstants
.
ONE_INT
==
tEmployeeProject
.
getFundStatus
()
||
CommonConstants
.
ZERO_INT
!=
tEmployeeProject
.
getInsuranceStatus
())
{
return
R
.
failed
(
"人员在该项目下存在进行中/未完结的服务"
);
}
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeProject
.
setLeaveTime
(
LocalDateTime
.
now
());
this
.
updateById
(
tEmployeeProject
);
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
//查询该人员其他的项目档案
List
<
TEmployeeProject
>
list
=
this
.
list
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmployeeProject
.
getEmpIdcard
())
.
ne
(
TEmployeeProject:
:
getDeptNo
,
tEmployeeProject
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
//查询该人员其他的项目档案
List
<
TEmployeeProject
>
list
=
this
.
list
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
tEmployeeProject
.
getEmpIdcard
())
.
ne
(
TEmployeeProject:
:
getDeptNo
,
tEmployeeProject
.
getDeptNo
())
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
if
(
tEmployeeProject
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
if
(
Common
.
isNotNull
(
list
))
{
return
R
.
failed
(
"该人员存在其他进行中的项目,禁止同步减档!"
);
}
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setLeaveReason
(
tEmployeeProject
.
getLeaveReason
());
if
(
Common
.
isNotNull
(
tEmployeeProject
.
getLeaveRemark
()))
{
tEmployeeInfo
.
setLeaveRemark
(
tEmployeeProject
.
getLeaveRemark
());
}
tEmployeeInfo
.
setLeaveTime
(
DateUtil
.
getCurrentDateTime
());
YifuUser
user
=
SecurityUtils
.
getUser
();
tEmployeeInfo
.
setLeaveUser
(
user
.
getId
());
tEmployeeInfo
.
setLeaveUserName
(
user
.
getNickname
());
code
=
CommonConstants
.
ONE_STRING
;
}
else
{
//从剩下的项目档案中查找员工类型并更新
if
(
Common
.
isNotNull
(
list
))
{
Set
<
String
>
empNatrue
=
list
.
stream
().
map
(
TEmployeeProject:
:
getEmpNatrue
).
collect
(
Collectors
.
toSet
());
if
(
empNatrue
.
stream
().
anyMatch
(
e
->
e
.
equals
(
CommonConstants
.
ZERO_STRING
)))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ZERO_STRING
);
}
else
if
(
empNatrue
.
stream
().
anyMatch
(
e
->
e
.
equals
(
CommonConstants
.
ONE_STRING
)))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ONE_STRING
);
}
else
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
TWO_STRING
);
}
}
if
(
tEmployeeProject
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
if
(
Common
.
isNotNull
(
list
))
{
return
R
.
failed
(
"该人员存在其他进行中的项目,禁止同步减档!"
);
}
if
(
tEmployeeInfo
.
getProjectNum
()
!=
CommonConstants
.
ZERO_INT
)
{
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
-
CommonConstants
.
ONE_INT
);
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setLeaveReason
(
tEmployeeProject
.
getLeaveReason
());
if
(
Common
.
isNotNull
(
tEmployeeProject
.
getLeaveRemark
()))
{
tEmployeeInfo
.
setLeaveRemark
(
tEmployeeProject
.
getLeaveRemark
());
}
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
TEmployeeProject
newInfo
=
this
.
getById
(
tEmployeeProject
.
getId
());
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeProjectOld
,
newInfo
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
code
))
{
return
R
.
ok
(
null
,
"减项减档成功"
);
}
else
{
return
R
.
ok
(
null
,
"减项成功,项目状态已更新为“已减项”"
);
tEmployeeInfo
.
setLeaveTime
(
DateUtil
.
getCurrentDateTime
());
YifuUser
user
=
SecurityUtils
.
getUser
();
tEmployeeInfo
.
setLeaveUser
(
user
.
getId
());
tEmployeeInfo
.
setLeaveUserName
(
user
.
getNickname
());
code
=
CommonConstants
.
ONE_STRING
;
}
else
{
//从剩下的项目档案中查找员工类型并更新
if
(
Common
.
isNotNull
(
list
))
{
Set
<
String
>
empNatrue
=
list
.
stream
().
map
(
TEmployeeProject:
:
getEmpNatrue
).
collect
(
Collectors
.
toSet
());
if
(
empNatrue
.
stream
().
anyMatch
(
e
->
e
.
equals
(
CommonConstants
.
ZERO_STRING
)))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ZERO_STRING
);
}
else
if
(
empNatrue
.
stream
().
anyMatch
(
e
->
e
.
equals
(
CommonConstants
.
ONE_STRING
)))
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
ONE_STRING
);
}
else
{
tEmployeeInfo
.
setEmpNatrue
(
CommonConstants
.
TWO_STRING
);
}
}
}
if
(
tEmployeeInfo
.
getProjectNum
()
!=
CommonConstants
.
ZERO_INT
)
{
tEmployeeInfo
.
setProjectNum
(
tEmployeeInfo
.
getProjectNum
()
-
CommonConstants
.
ONE_INT
);
}
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
TEmployeeProject
newInfo
=
this
.
getById
(
tEmployeeProject
.
getId
());
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeInfoOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeProjectOld
,
newInfo
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
code
))
{
return
R
.
ok
(
null
,
"减项减档成功"
);
}
else
{
return
R
.
ok
(
null
,
"减项成功,项目状态已更新为“已减项”"
);
}
}
return
R
.
failed
(
"人员在该项目下存在进行中/未完结的服务"
);
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_ERROR
);
}
@Override
...
...
@@ -575,7 +588,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
// 调用字典服务,渲染字典值
R
<
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>>
dictR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
R
<
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>>
dictR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dict/inner/getDictToValue"
,
null
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>
dictDataMap
;
Map
<
String
,
Map
<
String
,
String
>>
dictMap
;
...
...
@@ -610,9 +624,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
errorMessage
=
errorMessage
.
concat
(
" "
).
concat
(
";"
);
}
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
if
(
tEmployeeProject
.
getInsuranceStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getSocialStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getFundStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
])
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
errorMessage
+
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
)));
if
(
tEmployeeProject
.
getInsuranceStatus
()
!=
CommonConstants
.
dingleDigitIntArray
[
0
]
||
tEmployeeProject
.
getSocialStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
]
||
tEmployeeProject
.
getFundStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
errorMessage
+
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
)));
}
else
{
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
...
...
@@ -633,7 +649,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
errorMessage
+
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_SEARCH_EXIT
)));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
errorMessage
+
MsgUtils
.
getMessage
(
ErrorCodes
.
PROJECT_PERSON_SEARCH_EXIT
)));
}
}
if
(
errorMessageList
.
size
()
>
CommonConstants
.
ZERO_INT
)
{
...
...
@@ -1143,7 +1160,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
));
infoUpdList
.
add
(
tEmployeeInfo
);
}
else
{
errorList
.
add
(
new
ErrorMessage
(
i
,
delProject
.
getEmpName
()
+
";"
+
delProject
.
getEmpIdcard
()
+
";"
+
delProject
.
getDeptNo
()
+
";"
+
"项目档案状态为已审核,禁止删除"
));
errorList
.
add
(
new
ErrorMessage
(
i
,
delProject
.
getEmpName
()
+
";"
+
delProject
.
getEmpIdcard
()
+
";"
+
delProject
.
getDeptNo
()
+
";"
+
"项目档案状态为已审核,禁止删除"
));
}
}
catch
(
Exception
e
)
{
log
.
error
(
"项目档案批量删除异常:"
+
e
.
getMessage
());
...
...
@@ -1295,7 +1313,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
proupdateList
.
add
(
tEmployeeProject
);
// 记录变更日志
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeProjectOld
,
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeProjectOld
,
tEmployeeProject
);
}
/**
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
44e53e33
...
...
@@ -300,7 +300,7 @@ public interface ErrorCodes {
*/
String
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
=
"archives.project.change.not.exist"
;
/**
*
该人员存在其他进行中的项目,禁止同步减档!
*
人员在原项目中存在在途的服务,请先终止后,再进行划转
*/
String
QT_PROJECT_CHANGE_NOT_EXIST
=
"qt.project.change.not.exist"
;
/**
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
44e53e33
...
...
@@ -99,7 +99,7 @@ archives.project.change.not.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0B\u5B
archives.project.emp.lose.fee.not.empty
=
\u
4E0D
\u
826F
\u
8BB0
\u
5F55
\u
8D39
\u7528\u
635F
\u5931\u
548C
\u5176\u
4ED6
\u
635F
\u5931\u
4E0D
\u
53EF
\u
540C
\u
65F6
\u
4E3A
\u
7A7A
qt.project.change.not.exist
=
\u
8BE5
\u
4EBA
\u5458\u
5B58
\u5728\u5176\u
4ED6
\u
8FDB
\u
884C
\u
4E2D
\u7684\u9879\u
76EE
\u
FF0C
\u7981\u
6B62
\u
540C
\u
6B65
\u
51CF
\u6863
qt.project.change.not.exist
=
\u
4EBA
\u5458\u5728\u
539F
\u9879\u
76EE
\u
4E2D
\u
5B58
\u5728\u5728\u9014\u7684\u
670D
\u
52A1
\u
FF0C
\u
8BF7
\u5148\u
7EC8
\u
6B62
\u
540E
\u
FF0C
\u
518D
\u
8FDB
\u
884C
\u5212\u
8F6C
project.search.not.exist
=
\u
672A
\u
627E
\u5230\u
5BF9
\u
5E94
\u7684\u9879\u
76EE
\u
FF0C
\u
8BF7
\u6838\u
5B9E
change.strat.month.exit
=
\u5212\u
8F6C
\u
8D77
\u
59CB
\u6708\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
...
...
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