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
27f5b523
Commit
27f5b523
authored
May 09, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
划转相关调整
parent
f75e85ee
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
75 additions
and
12 deletions
+75
-12
TEmployeeProjectMapper.java
.../plus/v1/yifu/archives/mapper/TEmployeeProjectMapper.java
+2
-0
TEmployeeProjectService.java
...lus/v1/yifu/archives/service/TEmployeeProjectService.java
+2
-0
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+36
-11
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+11
-0
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+14
-0
CacheConstants.java
...oud/plus/v1/yifu/common/core/constant/CacheConstants.java
+2
-0
CommonConstants.java
...ud/plus/v1/yifu/common/core/constant/CommonConstants.java
+1
-1
ErrorCodes.java
.../cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
+5
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+2
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeProjectMapper.java
View file @
27f5b523
...
...
@@ -112,4 +112,6 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
List
<
BusinessEmployeeExtentExcelVO
>
getTEmployeeBusinessList
(
@Param
(
"query"
)
THroBusinessUserQuery
query
);
int
updateSocialAndFundStatusById
(
@Param
(
"project"
)
TEmployeeProject
project
);
int
updateChangeById
(
@Param
(
"project"
)
TEmployeeProject
project
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeProjectService.java
View file @
27f5b523
...
...
@@ -256,4 +256,6 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
* @date: 2021/8/10
*/
R
<
List
<
BusinessEmployeeExtentExcelVO
>>
exportByParams
(
THroBusinessUserQuery
query
);
void
updateChangeById
(
TEmployeeProject
oldEmpProject
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
27f5b523
...
...
@@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper
;
...
...
@@ -39,11 +40,14 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.BindingResult
;
import
java.util.*
;
...
...
@@ -358,6 +362,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
* @Description 档案划转
* @Date 2022/6/22
**/
@Transactional
@Override
public
R
<
Boolean
>
changeEmpProArcNew
(
TEmpChangeInfoNewVO
vo
)
{
if
(
Common
.
isEmpty
(
vo
)){
...
...
@@ -395,7 +400,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
if
(
Common
.
isEmpty
(
newEmpProject
)){
newEmpProject
=
new
TEmployeeProject
();
BeanUtil
.
copyProperties
(
oldEmpProject
,
newEmpProject
);
newEmpProject
.
set
Emp
Id
(
null
);
newEmpProject
.
setId
(
null
);
newEmpProject
.
setDeptId
(
vo
.
getNewDeptId
());
newEmpProject
.
setDeptName
(
vo
.
getNewDeptName
());
newEmpProject
.
setDeptNo
(
vo
.
getNewDeptNo
());
...
...
@@ -405,6 +410,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
newEmpProject
.
setBusinessPrimaryType
(
tSettleDomain
.
getBusinessPrimaryType
());
newEmpProject
.
setBusinessSecondType
(
tSettleDomain
.
getBusinessSecondType
());
newEmpProject
.
setBusinessThirdType
(
tSettleDomain
.
getBusinessThirdType
());
newEmpProject
.
setInsuranceStatus
(
null
);
updateTEmployeeProject
.
setDeptName
(
vo
.
getNewDeptName
());
updateTEmployeeProject
.
setDeptNo
(
vo
.
getNewDeptNo
());
...
...
@@ -431,8 +437,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updatesf
.
setUnitName
(
updateTEmployeeProject
.
getUnitName
());
// 处理社保 目标项目档案已有项目档案不做处理
if
(
vo
.
getChangeItems
().
indexOf
(
CommonConstants
.
ONE_STRING
)
>=
CommonConstants
.
ZERO_INT
)
{
if
(
CommonConstants
.
ZERO_INT
!=
updateTEmployeeProject
.
getSocialStatus
()
&&
(
Common
.
isEmpty
(
newEmpProject
.
getSocialStatus
())
if
(!(
Common
.
isEmpty
(
newEmpProject
.
getSocialStatus
())
||
CommonConstants
.
ZERO_INT
==
newEmpProject
.
getSocialStatus
())){
newEmpProject
.
setSocialStatus
(
oldEmpProject
.
getSocialStatus
());
newEmpProject
.
setSocialProvince
(
oldEmpProject
.
getSocialProvince
());
...
...
@@ -451,8 +456,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
// 处理公积金 如果目标项目档案已存在公积金 不划转
if
(
vo
.
getChangeItems
().
indexOf
(
CommonConstants
.
TWO_STRING
)
>=
CommonConstants
.
ZERO_INT
)
{
if
(
CommonConstants
.
ZERO_INT
!=
updateTEmployeeProject
.
getFundStatus
()
&&
(
Common
.
isEmpty
(
newEmpProject
.
getFundStatus
())
if
(!(
Common
.
isEmpty
(
newEmpProject
.
getFundStatus
())
||
CommonConstants
.
ZERO_INT
==
newEmpProject
.
getFundStatus
())){
newEmpProject
.
setFundStatus
(
oldEmpProject
.
getFundStatus
());
updatesf
.
setFlag
(
CommonConstants
.
ONE_STRING
);
...
...
@@ -465,29 +469,50 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
// 处理員工合同 目标 已有合同状态 不在处理合同划转
if
(
vo
.
getChangeItems
().
indexOf
(
CommonConstants
.
ZERO_STRING
)
>=
CommonConstants
.
ZERO_INT
){
if
((
Common
.
isEmpty
(
newEmpProject
.
getContractStatus
())
if
(
!
(
Common
.
isEmpty
(
newEmpProject
.
getContractStatus
())
||
CommonConstants
.
ZERO_INT
!=
newEmpProject
.
getContractStatus
())){
newEmpProject
.
setContractStatus
(
oldEmpProject
.
getContractStatus
());
newEmpProject
.
setContractType
(
oldEmpProject
.
getContractType
());
// 合同同步划转---只划转在用合同 fxj 2023-03-06
contractInfoMapper
.
updateContractChange
(
updateTEmployeeProject
.
getEmpIdcard
(),
updateTEmployeeProject
.
getDeptNo
(),
updateTEmployeeProject
.
getOldDeptNo
());
oldEmpProject
.
setContractStatus
(
CommonConstants
.
ZERO_INT
);
oldEmpProject
.
setContractType
(
null
);
resStr
.
append
(
"员工合同划转成功! <br>"
);
}
else
{
resStr
.
append
(
"目标项目档案存在员工合同数据,员工合同划转失败! <br>"
);
}
}
// 变更老的项目档案
tEmployeeProjectService
.
updateChangeById
(
oldEmpProject
);
//新增或变更新的项目档案
tEmployeeProjectService
.
saveOrUpdate
(
newEmpProject
);
//同步减项老项目档案
if
(
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getChangeType
())){
R
res
=
tEmployeeProjectService
.
deleteEmpPro
(
oldEmpProject
);
resStr
.
append
(
res
.
getMsg
());
}
}
TEmpChangeInfo
tEmpChangeInfo
=
new
TEmpChangeInfo
();
tEmpChangeInfo
.
setProId
(
updateTEmployeeProject
.
getId
());
//保存档案划转记录
this
.
save
(
tEmpChangeInfo
);
//保存变更记录
saveChangeInfo
(
newEmpProject
,
updateTEmployeeProject
);
return
R
.
ok
(
null
,
resStr
.
toString
());
}
private
void
saveChangeInfo
(
TEmployeeProject
newEmpProject
,
TEmployeeProject
updateTEmployeeProject
)
{
TEmpChangeInfo
changeInfo
=
new
TEmpChangeInfo
();
changeInfo
.
setProId
(
updateTEmployeeProject
.
getId
());
changeInfo
.
setEmpName
(
updateTEmployeeProject
.
getEmpName
());
changeInfo
.
setEmpIdcard
(
updateTEmployeeProject
.
getEmpIdcard
());
changeInfo
.
setOldDept
(
updateTEmployeeProject
.
getUnitName
());
changeInfo
.
setNewDept
(
newEmpProject
.
getUnitName
());
changeInfo
.
setOldSettle
(
updateTEmployeeProject
.
getDeptName
());
changeInfo
.
setNewSettle
(
newEmpProject
.
getDeptName
());
changeInfo
.
setUnsettleDeal
(
CommonConstants
.
ONE_STRING
);
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isNotNull
(
user
)){
changeInfo
.
setCreateBy
(
user
.
getId
());
changeInfo
.
setUpdateBy
(
user
.
getId
());
changeInfo
.
setCreateName
(
user
.
getNickname
());
}
//保存档案划转记录
this
.
save
(
changeInfo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
27f5b523
...
...
@@ -1705,4 +1705,15 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
return
R
.
ok
(
this
.
baseMapper
.
getTEmployeeBusinessList
(
query
));
}
/**
* @Author fxj
* @Description 划转数据更新
* @Date 11:42 2023/5/9
* @Param
* @return
**/
@Override
public
void
updateChangeById
(
TEmployeeProject
oldEmpProject
)
{
baseMapper
.
updateChangeById
(
oldEmpProject
);
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
27f5b523
...
...
@@ -1036,4 +1036,18 @@
</trim>
WHERE a.id=#{project.id}
</update>
<update
id=
"updateChangeById"
>
update t_employee_project a
<trim
prefix=
"set"
suffixOverrides=
","
>
<if
test=
"project.socialStatus != null"
>
SOCIAL_STATUS=#{project.socialStatus},
</if>
<if
test=
"project.fundStatus != null"
>
FUND_STATUS=#{project.fundStatus},
</if>
<if
test=
"project.socialProvince == null"
>
SOCIAL_PROVINCE= null,
</if>
<if
test=
"project.socialCity == null"
>
SOCIAL_CITY=null,
</if>
<if
test=
"project.socialTown == null"
>
SOCIAL_TOWN=null,
</if>
<if
test=
"project.contractStatus != null"
>
CONTRACT_STATUS=#{project.contractStatus},
</if>
<if
test=
"project.contractType == null"
>
CONTRACT_TYPE=null,
</if>
</trim>
WHERE a.id=#{project.id}
</update>
</mapper>
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CacheConstants.java
View file @
27f5b523
...
...
@@ -157,4 +157,6 @@ public interface CacheConstants {
String
EMP_ADD_LOCK
=
"emp_add_lock"
;
String
FUND_IMPORT_HANDLE_LOCK
=
"fund_import_handle_handle_lock"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
View file @
27f5b523
...
...
@@ -341,7 +341,7 @@ public interface CommonConstants {
public
static
final
String
JAR_TYPE
=
"jar"
;
int
BATCH_COUNT
=
100
;
int
BATCH_COUNT1
=
2000
;
String
IMPORT_DATA_ANALYSIS_ERROR
=
"数据导入解析异常,请检查表数据格式(1.日期格式:yyyy-MM-dd,2.比例为整数且不含%)"
;
String
IMPORT_DATA_ANALYSIS_ERROR
=
"数据导入解析异常,请检查表数据格式(
常见错误:
1.日期格式:yyyy-MM-dd,2.比例为整数且不含%)"
;
String
IMPORT_DATA_ANALYSIS_ERROR_TWO
=
"数据导入解析异常,请检查表数据格式"
;
String
CREATE_TIME
=
"CREATE_TIME"
;
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/exception/ErrorCodes.java
View file @
27f5b523
...
...
@@ -547,4 +547,9 @@ public interface ErrorCodes {
**/
String
EMP_DISPATCH_EMP_CONTRACT_SUB_NAME_NOT_EMPTY
=
"emp.dispatch.emp.contract.sub.name.not.empty"
;
/**
* 公积金办理:无办理权限或无可需要办理的公积金数据
*/
String
FUND_IMPORT_HANDLE_NOT_EXITS
=
"fund.import.handle.not.exits"
;
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
27f5b523
...
...
@@ -214,6 +214,8 @@ social.hold.is.empty=\u793E\u4FDD\u6237\u4E0D\u80FD\u4E3A\u7A7A
fund.hold.is.empty
=
\u
516C
\u
79EF
\u
91D1
\u6237\u
4E0D
\u
80FD
\u
4E3A
\u
7A7A
fund.import.handle.not.exits
=
\u
65E0
\u
529E
\u7406\u6743\u9650\u6216\u
65E0
\u
53EF
\u9700\u8981\u
529E
\u7406\u7684\u
516C
\u
79EF
\u
91D1
\u6570\u
636E
...
...
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