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
46ea3e9e
Commit
46ea3e9e
authored
Apr 20, 2026
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.22' into MVP1.7.22
parents
e0cebcdb
5693b5f3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
718 additions
and
66 deletions
+718
-66
EmployeeRegistrationPreVo.java
...d/plus/v1/yifu/archives/vo/EmployeeRegistrationPreVo.java
+4
-1
TEmployeePreLogController.java
...1/yifu/archives/controller/TEmployeePreLogController.java
+13
-0
TEmployeePreLogDetailController.java
.../archives/controller/TEmployeePreLogDetailController.java
+56
-0
TEmployeeContractPreServiceImpl.java
...rchives/service/impl/TEmployeeContractPreServiceImpl.java
+1
-1
TEmployeePreLogServiceImpl.java
...ifu/archives/service/impl/TEmployeePreLogServiceImpl.java
+172
-29
DoFascTask.java
...om/yifu/cloud/plus/v1/yifu/archives/utils/DoFascTask.java
+1
-1
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+43
-4
EmployeeRegistrationServiceImpl.java
.../v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
+428
-30
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeRegistrationPreVo.java
View file @
46ea3e9e
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TEmployeeInsurancePreVo
;
...
@@ -71,6 +72,7 @@ public class EmployeeRegistrationPreVo implements Serializable {
...
@@ -71,6 +72,7 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema
(
description
=
"就职岗位"
)
@Schema
(
description
=
"就职岗位"
)
private
String
position
;
private
String
position
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"入职日期"
)
@Schema
(
description
=
"入职日期"
)
private
Date
joinLeaveDate
;
private
Date
joinLeaveDate
;
...
@@ -100,13 +102,14 @@ public class EmployeeRegistrationPreVo implements Serializable {
...
@@ -100,13 +102,14 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema
(
description
=
"数据来源"
)
@Schema
(
description
=
"数据来源"
)
private
String
dataSource
;
private
String
dataSource
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"预计收集时间"
)
@Schema
(
description
=
"预计收集时间"
)
private
Date
expectedCollectionTime
;
private
Date
expectedCollectionTime
;
@Schema
(
description
=
"确认人"
)
@Schema
(
description
=
"确认人"
)
private
String
confirmUser
;
private
String
confirmUser
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"确认时间"
)
@Schema
(
description
=
"确认时间"
)
private
Date
confirmTime
;
private
Date
confirmTime
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeePreLogController.java
View file @
46ea3e9e
...
@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog;
...
@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLog;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeePreLogService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeePreLogService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeePreLogSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeePreLogSearchVo
;
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.security.annotation.Inner
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -84,4 +85,16 @@ public class TEmployeePreLogController {
...
@@ -84,4 +85,16 @@ public class TEmployeePreLogController {
return
R
.
ok
(
tEmployeePreLogService
.
getById
(
id
));
return
R
.
ok
(
tEmployeePreLogService
.
getById
(
id
));
}
}
/**
* 批量保存入职确认信息变更日志(内部接口)
*
* @param preLogList 日志列表
* @return Boolean
*/
@Inner
@PostMapping
(
"/inner/saveBatch"
)
public
Boolean
saveBatch
(
@RequestBody
List
<
TEmployeePreLog
>
preLogList
)
{
return
tEmployeePreLogService
.
saveBatch
(
preLogList
);
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeePreLogDetailController.java
0 → 100644
View file @
46ea3e9e
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeePreLogDetail
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeePreLogDetailService
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* 入职确认信息变更日志明细表
*
* @author hgw
* @date 2025-04-07 15:35:05
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/temployeeprelogdetail"
)
@Tag
(
name
=
"入职确认信息变更日志明细表管理"
)
public
class
TEmployeePreLogDetailController
{
private
final
TEmployeePreLogDetailService
tEmployeePreLogDetailService
;
/**
* 批量保存入职确认信息变更日志明细(内部接口)
*
* @param detailList 日志明细列表
* @return Boolean
*/
@Inner
@PostMapping
(
"/inner/saveBatch"
)
public
Boolean
saveBatch
(
@RequestBody
List
<
TEmployeePreLogDetail
>
detailList
)
{
return
tEmployeePreLogDetailService
.
saveBatch
(
detailList
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractPreServiceImpl.java
View file @
46ea3e9e
...
@@ -659,7 +659,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
...
@@ -659,7 +659,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
!
CommonConstants
.
ONE_STRING
.
equals
(
pre
.
getProcessStatus
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
pre
.
getProcessStatus
())
&&
Common
.
isNotNull
(
pre
.
getContractId
()))
{
Common
.
isNotNull
(
pre
.
getContractId
()))
{
TEmployeeContractAudit
audit
=
new
TEmployeeContractAudit
();
TEmployeeContractAudit
audit
=
new
TEmployeeContractAudit
();
audit
.
setRootName
(
"撤销签署"
);
audit
.
setRootName
(
"撤销签署
(合同待办列表消失)
"
);
audit
.
setLinkId
(
pre
.
getContractId
());
audit
.
setLinkId
(
pre
.
getContractId
());
audit
.
setLinkType
(
CommonConstants
.
ONE_INT
);
audit
.
setLinkType
(
CommonConstants
.
ONE_INT
);
audit
.
setRemark
(
registRevokeVo
.
getReason
());
audit
.
setRemark
(
registRevokeVo
.
getReason
());
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeePreLogServiceImpl.java
View file @
46ea3e9e
...
@@ -176,6 +176,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -176,6 +176,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
IGNORE_FIELD
.
add
(
"socialUpdateFlag"
);
IGNORE_FIELD
.
add
(
"socialUpdateFlag"
);
IGNORE_FIELD
.
add
(
"contractUpdateFlag"
);
IGNORE_FIELD
.
add
(
"contractUpdateFlag"
);
IGNORE_FIELD
.
add
(
"isLeave"
);
IGNORE_FIELD
.
add
(
"isRefuse"
);
IGNORE_FIELD
.
add
(
"configId"
);
}
}
private
static
final
List
<
String
>
PRE_IGNORE_FIELD
=
new
ArrayList
<>();
private
static
final
List
<
String
>
PRE_IGNORE_FIELD
=
new
ArrayList
<>();
...
@@ -189,6 +192,10 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -189,6 +192,10 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
PRE_IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
PRE_IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
PRE_IGNORE_FIELD
.
add
(
"socialUpdateFlag"
);
PRE_IGNORE_FIELD
.
add
(
"socialUpdateFlag"
);
PRE_IGNORE_FIELD
.
add
(
"contractUpdateFlag"
);
PRE_IGNORE_FIELD
.
add
(
"contractUpdateFlag"
);
PRE_IGNORE_FIELD
.
add
(
"isLeave"
);
PRE_IGNORE_FIELD
.
add
(
"isRefuse"
);
PRE_IGNORE_FIELD
.
add
(
"configId"
);
}
}
private
static
final
List
<
String
>
CONTRACT_IGNORE_FIELD
=
new
ArrayList
<>();
private
static
final
List
<
String
>
CONTRACT_IGNORE_FIELD
=
new
ArrayList
<>();
...
@@ -215,6 +222,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -215,6 +222,9 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
CONTRACT_IGNORE_FIELD
.
add
(
"internshipPeriodNum"
);
CONTRACT_IGNORE_FIELD
.
add
(
"internshipPeriodNum"
);
CONTRACT_IGNORE_FIELD
.
add
(
"tryPeriodNum"
);
CONTRACT_IGNORE_FIELD
.
add
(
"tryPeriodNum"
);
CONTRACT_IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
CONTRACT_IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
CONTRACT_IGNORE_FIELD
.
add
(
"isLeave"
);
CONTRACT_IGNORE_FIELD
.
add
(
"isRefuse"
);
CONTRACT_IGNORE_FIELD
.
add
(
"configId"
);
}
}
private
static
final
List
<
String
>
SOCIAL_IGNORE_FIELD
=
new
ArrayList
<>();
private
static
final
List
<
String
>
SOCIAL_IGNORE_FIELD
=
new
ArrayList
<>();
...
@@ -249,6 +259,45 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -249,6 +259,45 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
SOCIAL_IGNORE_FIELD
.
add
(
"lowerLimit"
);
SOCIAL_IGNORE_FIELD
.
add
(
"lowerLimit"
);
SOCIAL_IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
SOCIAL_IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
SOCIAL_IGNORE_FIELD
.
add
(
"processStatus"
);
SOCIAL_IGNORE_FIELD
.
add
(
"processStatus"
);
SOCIAL_IGNORE_FIELD
.
add
(
"isLeave"
);
SOCIAL_IGNORE_FIELD
.
add
(
"isRefuse"
);
SOCIAL_IGNORE_FIELD
.
add
(
"configId"
);
}
private
static
final
List
<
String
>
SOCIAL_IGNORE_FIELD_TWO
=
new
ArrayList
<>();
static
{
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"joinLeaveDate"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"createTime"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"empName"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"phone"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"employeeName"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"empIdcard"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"deptNo"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"deptName"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"deptId"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"customerUsername"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"customerUserLoginname"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"position"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"contractId"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"errorBackInfo"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"errorInfo"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"errorTime"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"socialFundId"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"dispatcherId"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"contractStatus"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"typeSub"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"registerId"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"createBy"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"createName"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"updateBy"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"id"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"expectedCollectionType"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"upperLimit"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"lowerLimit"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"fundUpdateFlag"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"isLeave"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"isRefuse"
);
SOCIAL_IGNORE_FIELD_TWO
.
add
(
"configId"
);
}
}
...
@@ -428,7 +477,24 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -428,7 +477,24 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
String
differenceContractKey
=
null
;
String
differenceContractKey
=
null
;
TEmployeeContractPre
employeeContractPre
=
newInfo
.
getEmployeeContractPre
();
TEmployeeContractPre
employeeContractPre
=
newInfo
.
getEmployeeContractPre
();
if
(!
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
oldInfo
.
getServerItem
().
contains
(
"合同"
)
&&
Common
.
isNotNull
(
contractOld
))
{
// 新增:如果之前不包含合同,现在包含合同,记录新增日志
if
(!
oldInfo
.
getServerItem
().
contains
(
"合同"
)
&&
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
Common
.
isNotNull
(
employeeContractPre
)
&&
null
!=
newInfo
.
getContractUpdateFlag
()
&&
newInfo
.
getContractUpdateFlag
())
{
//1.9.11 huych 附件类型不比较差异
employeeContractPre
.
setAttaList
(
null
);
detailEmpLog
=
new
TEmployeePreLogDetail
();
detailEmpLog
.
setModelType
(
CommonConstants
.
ONE_STRING
);
detailEmpLog
.
setType
(
CommonConstants
.
THREE_STRING
);
this
.
setLogBaseInfo
(
empPreId
,
null
,
employeeContractPre
,
user
,
differenceContractKey
,
logId
,
detailEmpLog
);
detailList
.
add
(
detailEmpLog
);
if
(
Common
.
isNotNull
(
diffTitle
))
{
diffTitle
+=
"、合同信息"
;
}
else
{
diffTitle
=
"合同信息"
;
}
//删除旧合同
}
else
if
(!
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
oldInfo
.
getServerItem
().
contains
(
"合同"
)
&&
Common
.
isNotNull
(
contractOld
))
{
//记录操作记录
//记录操作记录
contractOld
.
setAttaList
(
null
);
contractOld
.
setAttaList
(
null
);
detailEmpLog
=
new
TEmployeePreLogDetail
();
detailEmpLog
=
new
TEmployeePreLogDetail
();
...
@@ -481,6 +547,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -481,6 +547,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
.
in
(
TEmployeeContractPre:
:
getProcessStatus
,
Arrays
.
asList
(
"0"
,
"1"
,
"3"
,
"5"
,
"7"
,
"10"
,
"11"
))
.
in
(
TEmployeeContractPre:
:
getProcessStatus
,
Arrays
.
asList
(
"0"
,
"1"
,
"3"
,
"5"
,
"7"
,
"10"
,
"11"
))
.
eq
(
TEmployeeContractPre:
:
getId
,
contractOld
.
getId
()));
.
eq
(
TEmployeeContractPre:
:
getId
,
contractOld
.
getId
()));
}
}
//修改合同
if
(
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
contractOld
!=
null
&&
employeeContractPre
!=
null
if
(
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
contractOld
!=
null
&&
employeeContractPre
!=
null
&&
null
!=
newInfo
.
getContractUpdateFlag
()
&&
newInfo
.
getContractUpdateFlag
())
{
&&
null
!=
newInfo
.
getContractUpdateFlag
()
&&
newInfo
.
getContractUpdateFlag
())
{
//1.9.11 huych 附件类型不比较差异
//1.9.11 huych 附件类型不比较差异
...
@@ -506,8 +573,46 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -506,8 +573,46 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
}
String
differenceSocialKey
;
String
differenceSocialKey
;
if
(
newInfo
.
getServerItem
().
contains
(
"社保"
)
&&
null
!=
newInfo
.
getSocialUpdateFlag
()
// 查询老的社保明细
&&
newInfo
.
getSocialUpdateFlag
()
&&
(
Common
.
isEmpty
(
isSocailBuyOld
)
||
R
<
EmployeePreSocialListVo
>
socialSdr
=
socialDaprUtils
.
getSocialPreInfoList
(
empPreId
);
TDispatchInfoPreVo
dispatchInfoPreOldVo
=
null
;
if
(
socialSdr
!=
null
&&
socialSdr
.
getData
()
!=
null
&&
null
!=
socialSdr
.
getData
().
getDispatchInfoPreVo
())
{
dispatchInfoPreOldVo
=
socialSdr
.
getData
().
getDispatchInfoPreVo
();
}
TDispatchInfoPreVo
dispatchInfoPreVo
=
newInfo
.
getDispatchInfoPreVo
();
// 新增:如果之前不包含社保,现在包含社保,记录新增日志
if
(!
oldInfo
.
getServerItem
().
contains
(
"社保"
)
&&
newInfo
.
getServerItem
().
contains
(
"社保"
)
&&
null
!=
newInfo
.
getSocialUpdateFlag
()
&&
newInfo
.
getSocialUpdateFlag
())
{
// 单独记录是否已购买社保的变更记录
if
(
Common
.
isEmpty
(
isSocailBuyOld
)
||
(
Common
.
isNotNull
(
isSocailBuyOld
)
&&
!
isSocailBuyOld
.
equals
(
isSocailBuyNew
)))
{
differenceSocialKey
=
"socialIsBuy"
;
TEmployeePreLogDetail
detailSocialLog
=
new
TEmployeePreLogDetail
();
detailSocialLog
.
setModelType
(
CommonConstants
.
ONE_STRING
);
detailSocialLog
.
setType
(
CommonConstants
.
FOUR_STRING
);
Map
<
String
,
Object
>
old
=
new
HashMap
<>();
old
.
put
(
"socialIsBuy"
,
isSocailBuyOld
);
Map
<
String
,
Object
>
simNew
=
new
HashMap
<>();
simNew
.
put
(
"socialIsBuy"
,
isSocailBuyNew
);
this
.
setLogBaseInfo
(
empPreId
,
old
,
simNew
,
user
,
differenceSocialKey
,
logId
,
detailSocialLog
);
detailList
.
add
(
detailSocialLog
);
}
// 记录社保明细新增日志
if
(
dispatchInfoPreVo
!=
null
)
{
detailEmpLog
=
new
TEmployeePreLogDetail
();
detailEmpLog
.
setModelType
(
CommonConstants
.
ONE_STRING
);
detailEmpLog
.
setType
(
CommonConstants
.
FOUR_STRING
);
this
.
setLogBaseInfo
(
empPreId
,
null
,
dispatchInfoPreVo
,
user
,
null
,
logId
,
detailEmpLog
);
detailList
.
add
(
detailEmpLog
);
}
if
(
Common
.
isNotNull
(
diffTitle
))
{
diffTitle
+=
"、社保信息"
;
}
else
{
diffTitle
=
"社保信息"
;
}
// 是否已购买记录
}
else
if
(
newInfo
.
getServerItem
().
contains
(
"社保"
)
&&
null
!=
newInfo
.
getSocialUpdateFlag
()
&&
newInfo
.
getSocialUpdateFlag
()
&&
(
Common
.
isEmpty
(
isSocailBuyOld
)
||
(
Common
.
isNotNull
(
isSocailBuyOld
)
&&
!
isSocailBuyOld
.
equals
(
isSocailBuyNew
))))
{
(
Common
.
isNotNull
(
isSocailBuyOld
)
&&
!
isSocailBuyOld
.
equals
(
isSocailBuyNew
))))
{
//单独记录是否已购买社保的变更记录
//单独记录是否已购买社保的变更记录
differenceSocialKey
=
"socialIsBuy"
;
differenceSocialKey
=
"socialIsBuy"
;
...
@@ -526,14 +631,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -526,14 +631,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
diffTitle
=
"社保信息"
;
diffTitle
=
"社保信息"
;
}
}
}
}
//查询老的社保明细
// 删除:如果之前包含社保,现在不包含社保,记录删除日志
R
<
EmployeePreSocialListVo
>
socialSdr
=
socialDaprUtils
.
getSocialPreInfoList
(
empPreId
);
TDispatchInfoPreVo
dispatchInfoPreOldVo
=
null
;
if
(
socialSdr
!=
null
&&
socialSdr
.
getData
()
!=
null
&&
null
!=
socialSdr
.
getData
().
getDispatchInfoPreVo
())
{
dispatchInfoPreOldVo
=
socialSdr
.
getData
().
getDispatchInfoPreVo
();
}
TDispatchInfoPreVo
dispatchInfoPreVo
=
newInfo
.
getDispatchInfoPreVo
();
if
(!
newInfo
.
getServerItem
().
contains
(
"社保"
)
&&
oldInfo
.
getServerItem
().
contains
(
"社保"
))
{
if
(!
newInfo
.
getServerItem
().
contains
(
"社保"
)
&&
oldInfo
.
getServerItem
().
contains
(
"社保"
))
{
//删除社保待购买相关数据
//删除社保待购买相关数据
socialDaprUtils
.
deleteUnProcessSocialPreInfo
(
empPreId
);
socialDaprUtils
.
deleteUnProcessSocialPreInfo
(
empPreId
);
...
@@ -552,12 +650,11 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -552,12 +650,11 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
diffTitle
=
"社保信息"
;
diffTitle
=
"社保信息"
;
}
}
}
}
}
//修改
}
else
if
(
newInfo
.
getServerItem
().
contains
(
"社保"
)&&
null
!=
newInfo
.
getSocialUpdateFlag
()
if
(
newInfo
.
getServerItem
().
contains
(
"社保"
)&&
null
!=
newInfo
.
getSocialUpdateFlag
()
&&
newInfo
.
getSocialUpdateFlag
()
&&
dispatchInfoPreOldVo
!=
null
&&
dispatchInfoPreVo
!=
null
)
{
&&
newInfo
.
getSocialUpdateFlag
()
&&
dispatchInfoPreOldVo
!=
null
&&
dispatchInfoPreVo
!=
null
)
{
differenceSocialKey
=
HrEquator
.
comparisonValueIgnoreField
(
dispatchInfoPreOldVo
differenceSocialKey
=
HrEquator
.
comparisonValueIgnoreField
(
dispatchInfoPreOldVo
,
dispatchInfoPreVo
,
SOCIAL_IGNORE_FIELD
);
,
dispatchInfoPreVo
,
SOCIAL_IGNORE_FIELD
_TWO
);
if
(
differenceSocialKey
.
length
()
>
0
)
{
if
(
differenceSocialKey
.
length
()
>
0
)
{
if
(
Common
.
isNotNull
(
diffTitle
))
{
if
(
Common
.
isNotNull
(
diffTitle
))
{
diffTitle
+=
"、社保信息"
;
diffTitle
+=
"、社保信息"
;
...
@@ -575,7 +672,45 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -575,7 +672,45 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
// 公积金处理逻辑
// 公积金处理逻辑
String
differenceFundKey
;
String
differenceFundKey
;
if
(
newInfo
.
getServerItem
().
contains
(
"公积金"
)
&&
null
!=
newInfo
.
getFundUpdateFlag
()
// 查询老的公积金明细
R
<
EmployeePreSocialListVo
>
fundSdr
=
socialDaprUtils
.
getFundPreInfoList
(
empPreId
);
TDispatchInfoPreVo
dispatchInfoFundPreOldVo
=
null
;
if
(
fundSdr
!=
null
&&
fundSdr
.
getData
()
!=
null
&&
null
!=
fundSdr
.
getData
().
getDispatchInfoPreFundVo
())
{
dispatchInfoFundPreOldVo
=
fundSdr
.
getData
().
getDispatchInfoPreFundVo
();
}
TDispatchInfoPreVo
dispatchInfoFundPreVo
=
newInfo
.
getDispatchInfoFundPreVo
();
// 如果之前不包含公积金,现在包含公积金,记录新增日志
if
(!
oldInfo
.
getServerItem
().
contains
(
"公积金"
)
&&
newInfo
.
getServerItem
().
contains
(
"公积金"
)
&&
null
!=
newInfo
.
getFundUpdateFlag
()
&&
newInfo
.
getFundUpdateFlag
())
{
// 单独记录是否已购买公积金的变更记录
if
(
Common
.
isEmpty
(
isFundBuyOld
)
||
(
Common
.
isNotNull
(
isFundBuyOld
)
&&
!
isFundBuyOld
.
equals
(
isFundBuyNew
)))
{
differenceFundKey
=
"fundIsBuy"
;
TEmployeePreLogDetail
detailFundLog
=
new
TEmployeePreLogDetail
();
detailFundLog
.
setModelType
(
CommonConstants
.
ONE_STRING
);
detailFundLog
.
setType
(
CommonConstants
.
FIVE_STRING
);
Map
<
String
,
Object
>
old
=
new
HashMap
<>();
old
.
put
(
"fundIsBuy"
,
isFundBuyOld
);
Map
<
String
,
Object
>
simNew
=
new
HashMap
<>();
simNew
.
put
(
"fundIsBuy"
,
isFundBuyNew
);
this
.
setLogBaseInfo
(
empPreId
,
old
,
simNew
,
user
,
differenceFundKey
,
logId
,
detailFundLog
);
detailList
.
add
(
detailFundLog
);
}
// 记录公积金明细新增日志
if
(
dispatchInfoFundPreVo
!=
null
)
{
detailEmpLog
=
new
TEmployeePreLogDetail
();
detailEmpLog
.
setModelType
(
CommonConstants
.
ONE_STRING
);
detailEmpLog
.
setType
(
CommonConstants
.
FIVE_STRING
);
this
.
setLogBaseInfo
(
empPreId
,
null
,
dispatchInfoFundPreVo
,
user
,
null
,
logId
,
detailEmpLog
);
detailList
.
add
(
detailEmpLog
);
}
if
(
Common
.
isNotNull
(
diffTitle
))
{
diffTitle
+=
"、公积金信息"
;
}
else
{
diffTitle
=
"公积金信息"
;
}
// 是否已有修改记录更新
}
else
if
(
newInfo
.
getServerItem
().
contains
(
"公积金"
)
&&
null
!=
newInfo
.
getFundUpdateFlag
()
&&
newInfo
.
getFundUpdateFlag
()
&&
(
Common
.
isEmpty
(
isFundBuyOld
)
||
&&
newInfo
.
getFundUpdateFlag
()
&&
(
Common
.
isEmpty
(
isFundBuyOld
)
||
(
Common
.
isNotNull
(
isFundBuyOld
)
&&
!
isFundBuyOld
.
equals
(
isFundBuyNew
))))
{
(
Common
.
isNotNull
(
isFundBuyOld
)
&&
!
isFundBuyOld
.
equals
(
isFundBuyNew
))))
{
//单独记录是否已购买公积金的变更记录
//单独记录是否已购买公积金的变更记录
...
@@ -595,14 +730,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -595,14 +730,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
diffTitle
=
"公积金信息"
;
diffTitle
=
"公积金信息"
;
}
}
}
}
//查询老的公积金明细
// 删除:如果之前包含公积金,现在不包含公积金,记录删除日志
R
<
EmployeePreSocialListVo
>
fundSdr
=
socialDaprUtils
.
getFundPreInfoList
(
empPreId
);
TDispatchInfoPreVo
dispatchInfoFundPreOldVo
=
null
;
if
(
fundSdr
!=
null
&&
fundSdr
.
getData
()
!=
null
&&
null
!=
fundSdr
.
getData
().
getDispatchInfoPreFundVo
())
{
dispatchInfoFundPreOldVo
=
fundSdr
.
getData
().
getDispatchInfoPreFundVo
();
}
TDispatchInfoPreVo
dispatchInfoFundPreVo
=
newInfo
.
getDispatchInfoFundPreVo
();
if
(!
newInfo
.
getServerItem
().
contains
(
"公积金"
)
&&
oldInfo
.
getServerItem
().
contains
(
"公积金"
))
{
if
(!
newInfo
.
getServerItem
().
contains
(
"公积金"
)
&&
oldInfo
.
getServerItem
().
contains
(
"公积金"
))
{
//删除公积金待购买相关数据
//删除公积金待购买相关数据
socialDaprUtils
.
deleteUnProcessFundPreInfo
(
empPreId
);
socialDaprUtils
.
deleteUnProcessFundPreInfo
(
empPreId
);
...
@@ -621,14 +749,13 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -621,14 +749,13 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
diffTitle
=
"公积金信息"
;
diffTitle
=
"公积金信息"
;
}
}
}
}
}
// 修改记录日志
}
else
if
(
newInfo
.
getServerItem
().
contains
(
"公积金"
)
&&
null
!=
newInfo
.
getFundUpdateFlag
()
if
(
newInfo
.
getServerItem
().
contains
(
"公积金"
)
&&
null
!=
newInfo
.
getFundUpdateFlag
()
&&
newInfo
.
getFundUpdateFlag
()
&&
dispatchInfoFundPreOldVo
!=
null
&&
newInfo
.
getFundUpdateFlag
()
&&
dispatchInfoFundPreOldVo
!=
null
&&
dispatchInfoFundPreVo
!=
null
)
{
&&
dispatchInfoFundPreVo
!=
null
)
{
//initFundTime(dispatchInfoFundPreVo);
//initFundTime(dispatchInfoFundPreVo);
differenceFundKey
=
HrEquator
.
comparisonValueIgnoreField
(
dispatchInfoFundPreOldVo
differenceFundKey
=
HrEquator
.
comparisonValueIgnoreField
(
dispatchInfoFundPreOldVo
,
dispatchInfoFundPreVo
,
SOCIAL_IGNORE_FIELD
);
,
dispatchInfoFundPreVo
,
SOCIAL_IGNORE_FIELD
_TWO
);
if
(
differenceFundKey
.
length
()
>
0
)
{
if
(
differenceFundKey
.
length
()
>
0
)
{
if
(
Common
.
isNotNull
(
diffTitle
))
{
if
(
Common
.
isNotNull
(
diffTitle
))
{
diffTitle
+=
"、公积金信息"
;
diffTitle
+=
"、公积金信息"
;
...
@@ -953,7 +1080,23 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
...
@@ -953,7 +1080,23 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
String
differenceContractKey
=
null
;
String
differenceContractKey
=
null
;
TEmployeeContractPre
employeeContractPre
=
newInfo
.
getEmployeeContractPre
();
TEmployeeContractPre
employeeContractPre
=
newInfo
.
getEmployeeContractPre
();
if
(!
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
oldInfo
.
getServerItem
().
contains
(
"合同"
)
&&
Common
.
isNotNull
(
contractOld
))
{
// 如果之前不包含合同,现在包含合同,记录新增日志
if
(!
oldInfo
.
getServerItem
().
contains
(
"合同"
)
&&
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
Common
.
isNotNull
(
employeeContractPre
)
&&
null
!=
newInfo
.
getContractUpdateFlag
()
&&
newInfo
.
getContractUpdateFlag
())
{
//1.9.11 huych 附件类型不比较差异
employeeContractPre
.
setAttaList
(
null
);
detailEmpLog
=
new
TEmployeePreLogDetail
();
detailEmpLog
.
setModelType
(
CommonConstants
.
ONE_STRING
);
detailEmpLog
.
setType
(
CommonConstants
.
THREE_STRING
);
this
.
setPreLogBaseInfo
(
empPreId
,
null
,
employeeContractPre
,
userId
,
nickName
,
differenceContractKey
,
logId
,
detailEmpLog
);
detailList
.
add
(
detailEmpLog
);
if
(
Common
.
isNotNull
(
diffTitle
))
{
diffTitle
+=
"、合同信息"
;
}
else
{
diffTitle
=
"合同信息"
;
}
}
else
if
(!
newInfo
.
getServerItem
().
contains
(
"合同"
)
&&
oldInfo
.
getServerItem
().
contains
(
"合同"
)
&&
Common
.
isNotNull
(
contractOld
))
{
//记录操作记录
//记录操作记录
contractOld
.
setAttaList
(
null
);
contractOld
.
setAttaList
(
null
);
detailEmpLog
=
new
TEmployeePreLogDetail
();
detailEmpLog
=
new
TEmployeePreLogDetail
();
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/utils/DoFascTask.java
View file @
46ea3e9e
...
@@ -250,7 +250,7 @@ public class DoFascTask {
...
@@ -250,7 +250,7 @@ public class DoFascTask {
!
CommonConstants
.
ONE_STRING
.
equals
(
pre
.
getProcessStatus
())
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
pre
.
getProcessStatus
())
&&
Common
.
isNotNull
(
pre
.
getContractId
()))
{
Common
.
isNotNull
(
pre
.
getContractId
()))
{
// 加日志
// 加日志
this
.
saveAuditLogFail
(
pre
,
"撤销签署成功"
,
terminationNote
);
this
.
saveAuditLogFail
(
pre
,
"撤销签署成功
(合同待办列表消失)
"
,
terminationNote
);
}
}
if
(!
CommonConstants
.
ELEVEN_STRING
.
equals
(
pre
.
getProcessStatus
()))
{
if
(!
CommonConstants
.
ELEVEN_STRING
.
equals
(
pre
.
getProcessStatus
()))
{
pre
.
setProcessStatus
(
CommonConstants
.
TEN_STRING
);
pre
.
setProcessStatus
(
CommonConstants
.
TEN_STRING
);
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
46ea3e9e
...
@@ -3,10 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
...
@@ -3,10 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.alibaba.fastjson.TypeReference
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysCspDeptVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysCspDeptVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TBusinessEmployeeExtendInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.*
;
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.constant.SecurityConstants
;
...
@@ -783,5 +780,47 @@ public class ArchivesDaprUtil {
...
@@ -783,5 +780,47 @@ public class ArchivesDaprUtil {
}
}
return
res
;
return
res
;
}
}
/**
* @Description: 批量保存入职确认信息变更日志
* @Author: fxj
* @Date: 2026-04-16
* @param preLogList 日志主表列表
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public
R
<
Boolean
>
savePreLogBatch
(
List
<
TEmployeePreLog
>
preLogList
){
R
<
Boolean
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/temployeeprelog/inner/saveBatch"
,
JSON
.
toJSONString
(
preLogList
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"保存入职确认信息变更日志失败!"
);
}
return
res
;
}
/**
* @Description: 批量保存入职确认信息变更日志明细
* @Author: fxj
* @Date: 2026-04-16
* @param detailList 日志明细列表
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public
R
<
Boolean
>
savePreLogDetailBatch
(
List
<
TEmployeePreLogDetail
>
detailList
){
R
<
Boolean
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/temployeeprelogdetail/inner/saveBatch"
,
JSON
.
toJSONString
(
detailList
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"保存入职确认信息变更日志明细失败!"
);
}
return
res
;
}
}
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
View file @
46ea3e9e
...
@@ -8,6 +8,7 @@ import com.alibaba.excel.read.listener.ReadListener;
...
@@ -8,6 +8,7 @@ import com.alibaba.excel.read.listener.ReadListener;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
@@ -40,6 +41,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.UserPermissionVo;
...
@@ -40,6 +41,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.UserPermissionVo;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
...
@@ -120,6 +122,119 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -120,6 +122,119 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
@Autowired
@Autowired
private
ContractTermCalculator
calculator
=
new
ContractTermCalculator
();
private
ContractTermCalculator
calculator
=
new
ContractTermCalculator
();
// 社保/公积金派单信息比较时忽略的字段
private
static
final
List
<
String
>
SOCIAL_IGNORE_FIELD
=
new
ArrayList
<>();
static
{
SOCIAL_IGNORE_FIELD
.
add
(
"joinLeaveDate"
);
SOCIAL_IGNORE_FIELD
.
add
(
"createTime"
);
SOCIAL_IGNORE_FIELD
.
add
(
"empName"
);
SOCIAL_IGNORE_FIELD
.
add
(
"phone"
);
SOCIAL_IGNORE_FIELD
.
add
(
"employeeName"
);
SOCIAL_IGNORE_FIELD
.
add
(
"empIdcard"
);
SOCIAL_IGNORE_FIELD
.
add
(
"deptNo"
);
SOCIAL_IGNORE_FIELD
.
add
(
"deptName"
);
SOCIAL_IGNORE_FIELD
.
add
(
"deptId"
);
SOCIAL_IGNORE_FIELD
.
add
(
"customerUsername"
);
SOCIAL_IGNORE_FIELD
.
add
(
"customerUserLoginname"
);
SOCIAL_IGNORE_FIELD
.
add
(
"position"
);
SOCIAL_IGNORE_FIELD
.
add
(
"contractId"
);
SOCIAL_IGNORE_FIELD
.
add
(
"errorBackInfo"
);
SOCIAL_IGNORE_FIELD
.
add
(
"errorInfo"
);
SOCIAL_IGNORE_FIELD
.
add
(
"errorTime"
);
SOCIAL_IGNORE_FIELD
.
add
(
"socialFundId"
);
SOCIAL_IGNORE_FIELD
.
add
(
"dispatcherId"
);
SOCIAL_IGNORE_FIELD
.
add
(
"contractStatus"
);
SOCIAL_IGNORE_FIELD
.
add
(
"typeSub"
);
SOCIAL_IGNORE_FIELD
.
add
(
"registerId"
);
SOCIAL_IGNORE_FIELD
.
add
(
"createBy"
);
SOCIAL_IGNORE_FIELD
.
add
(
"createName"
);
SOCIAL_IGNORE_FIELD
.
add
(
"updateBy"
);
SOCIAL_IGNORE_FIELD
.
add
(
"id"
);
SOCIAL_IGNORE_FIELD
.
add
(
"expectedCollectionType"
);
SOCIAL_IGNORE_FIELD
.
add
(
"upperLimit"
);
SOCIAL_IGNORE_FIELD
.
add
(
"lowerLimit"
);
SOCIAL_IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
SOCIAL_IGNORE_FIELD
.
add
(
"processStatus"
);
SOCIAL_IGNORE_FIELD
.
add
(
"isLeave"
);
SOCIAL_IGNORE_FIELD
.
add
(
"isRefuse"
);
SOCIAL_IGNORE_FIELD
.
add
(
"configId"
);
}
// 档案信息比较时忽略的字段
private
static
final
List
<
String
>
PRE_IGNORE_FIELD
=
new
ArrayList
<>();
static
{
PRE_IGNORE_FIELD
.
add
(
"createTime"
);
PRE_IGNORE_FIELD
.
add
(
"deptId"
);
PRE_IGNORE_FIELD
.
add
(
"dataSource"
);
PRE_IGNORE_FIELD
.
add
(
"createBy"
);
PRE_IGNORE_FIELD
.
add
(
"createName"
);
PRE_IGNORE_FIELD
.
add
(
"updateBy"
);
PRE_IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
PRE_IGNORE_FIELD
.
add
(
"socialUpdateFlag"
);
PRE_IGNORE_FIELD
.
add
(
"contractUpdateFlag"
);
PRE_IGNORE_FIELD
.
add
(
"isLeave"
);
PRE_IGNORE_FIELD
.
add
(
"isRefuse"
);
PRE_IGNORE_FIELD
.
add
(
"configId"
);
}
// 合同信息比较时忽略的字段
private
static
final
List
<
String
>
CONTRACT_IGNORE_FIELD
=
new
ArrayList
<>();
static
{
CONTRACT_IGNORE_FIELD
.
add
(
"joinLeaveDate"
);
CONTRACT_IGNORE_FIELD
.
add
(
"createTime"
);
CONTRACT_IGNORE_FIELD
.
add
(
"empPhone"
);
CONTRACT_IGNORE_FIELD
.
add
(
"employeeName"
);
CONTRACT_IGNORE_FIELD
.
add
(
"empIdcard"
);
CONTRACT_IGNORE_FIELD
.
add
(
"deptNo"
);
CONTRACT_IGNORE_FIELD
.
add
(
"deptName"
);
CONTRACT_IGNORE_FIELD
.
add
(
"deptId"
);
CONTRACT_IGNORE_FIELD
.
add
(
"changeTypeReason"
);
CONTRACT_IGNORE_FIELD
.
add
(
"changeTypeUser"
);
CONTRACT_IGNORE_FIELD
.
add
(
"changeTypeTime"
);
CONTRACT_IGNORE_FIELD
.
add
(
"dataSource"
);
CONTRACT_IGNORE_FIELD
.
add
(
"contractId"
);
CONTRACT_IGNORE_FIELD
.
add
(
"registerId"
);
CONTRACT_IGNORE_FIELD
.
add
(
"createBy"
);
CONTRACT_IGNORE_FIELD
.
add
(
"createName"
);
CONTRACT_IGNORE_FIELD
.
add
(
"updateBy"
);
CONTRACT_IGNORE_FIELD
.
add
(
"id"
);
CONTRACT_IGNORE_FIELD
.
add
(
"timeoutElecSign"
);
CONTRACT_IGNORE_FIELD
.
add
(
"internshipPeriodNum"
);
CONTRACT_IGNORE_FIELD
.
add
(
"tryPeriodNum"
);
CONTRACT_IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
CONTRACT_IGNORE_FIELD
.
add
(
"isLeave"
);
CONTRACT_IGNORE_FIELD
.
add
(
"isRefuse"
);
CONTRACT_IGNORE_FIELD
.
add
(
"configId"
);
}
// 商险明细比较时忽略的字段
private
static
final
List
<
String
>
INSURANCE_IGNORE_FIELD
=
new
ArrayList
<>();
static
{
INSURANCE_IGNORE_FIELD
.
add
(
"joinLeaveDate"
);
INSURANCE_IGNORE_FIELD
.
add
(
"createTime"
);
INSURANCE_IGNORE_FIELD
.
add
(
"modelType"
);
INSURANCE_IGNORE_FIELD
.
add
(
"empPhone"
);
INSURANCE_IGNORE_FIELD
.
add
(
"employeeName"
);
INSURANCE_IGNORE_FIELD
.
add
(
"empIdcard"
);
INSURANCE_IGNORE_FIELD
.
add
(
"deptNo"
);
INSURANCE_IGNORE_FIELD
.
add
(
"deptName"
);
INSURANCE_IGNORE_FIELD
.
add
(
"deptId"
);
INSURANCE_IGNORE_FIELD
.
add
(
"customerUsername"
);
INSURANCE_IGNORE_FIELD
.
add
(
"customerUserLoginname"
);
INSURANCE_IGNORE_FIELD
.
add
(
"dataSource"
);
INSURANCE_IGNORE_FIELD
.
add
(
"position"
);
INSURANCE_IGNORE_FIELD
.
add
(
"createBy"
);
INSURANCE_IGNORE_FIELD
.
add
(
"createName"
);
INSURANCE_IGNORE_FIELD
.
add
(
"updateBy"
);
INSURANCE_IGNORE_FIELD
.
add
(
"isAddress"
);
INSURANCE_IGNORE_FIELD
.
add
(
"fundUpdateFlag"
);
INSURANCE_IGNORE_FIELD
.
add
(
"socialUpdateFlag"
);
INSURANCE_IGNORE_FIELD
.
add
(
"contractUpdateFlag"
);
INSURANCE_IGNORE_FIELD
.
add
(
"isLeave"
);
INSURANCE_IGNORE_FIELD
.
add
(
"isRefuse"
);
INSURANCE_IGNORE_FIELD
.
add
(
"configId"
);
}
/**
/**
* 入离职登记表简单分页查询
* 入离职登记表简单分页查询
*
*
...
@@ -826,6 +941,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -826,6 +941,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
socialDaprUtils
.
saveFundPreInfo
(
preVo
);
socialDaprUtils
.
saveFundPreInfo
(
preVo
);
}
}
}
}
//确认接收时增加 档案、商险、合同、社保、公积金的变更日志 (具体产生哪些日志按服务事项(serverItem)来生成),参考 tEmployeePreLogService.saveModifyAndUpdateInsurance的实现,只处理日志
saveConfirmReceiveLog
(
domainR
.
getData
(),
preVo
,
user
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"自动化办理执行异常"
,
e
);
log
.
error
(
"自动化办理执行异常"
,
e
);
}
}
...
@@ -1621,6 +1738,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -1621,6 +1738,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
}
socialDaprUtils
.
saveFundPreInfo
(
preVo
);
socialDaprUtils
.
saveFundPreInfo
(
preVo
);
}
}
//确认接收时增加 档案、商险、合同、社保、公积金的变更日志 (具体产生哪些日志按服务事项(serverItem)来生成),参考 tEmployeePreLogService.saveModifyAndUpdateInsurance的实现,只处理日志
saveConfirmReceiveLog
(
domainR
.
getData
(),
preVo
,
user
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
log
.
error
(
"执行异常"
,
e
);
...
@@ -2847,8 +2966,16 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -2847,8 +2966,16 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
TSettleDomainSelectVo
selectVo
=
null
;
TSettleDomainSelectVo
selectVo
=
null
;
R
<
SysAutoDictItemVo
>
domainDictR
=
null
;
R
<
SysAutoDictItemVo
>
domainDictR
=
null
;
List
<
String
>
postConfigList
=
null
;
List
<
String
>
postConfigList
=
null
;
//定义判别用户身份证号的正则表达式(要么是15位,要么是18位,最后一位可以为字母)
Pattern
idNumPattern
=
compile
(
"(\\d{14}[0-9a-zA-Z])|(\\d{17}[0-9a-zA-Z])"
);
//该人员入职/离职数据已登记,请勿重复操作
EmployeeRegistration
exit
;
StringBuilder
errorTempBuilder
;
EmployeeRegistration
insert
;
for
(
EmployeeRegistrationNewVo
excel
:
excelVOList
)
{
for
(
EmployeeRegistrationNewVo
excel
:
excelVOList
)
{
selectVo
=
domainMap
.
get
(
excel
.
getDeptNo
());
selectVo
=
domainMap
.
get
(
excel
.
getDeptNo
());
//统一校验(整合所有错误信息一起返回)
List
<
String
>
errorList
=
new
ArrayList
<>();
if
(
null
==
selectVo
){
if
(
null
==
selectVo
){
//获取项目信息
//获取项目信息
R
<
TSettleDomainSelectVo
>
domainR
=
archivesDaprUtil
.
getSettleDomainSelectVoById
(
excel
.
getDeptNo
());
R
<
TSettleDomainSelectVo
>
domainR
=
archivesDaprUtil
.
getSettleDomainSelectVoById
(
excel
.
getDeptNo
());
...
@@ -2861,22 +2988,21 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -2861,22 +2988,21 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
continue
;
continue
;
}
}
if
(
null
==
domainR
.
getData
()){
if
(
null
==
domainR
.
getData
()){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"未查询到具体项目信息"
,
excel
));
errorList
.
add
(
"未查询到具体项目信息"
);
continue
;
selectVo
=
null
;
}
else
{
selectVo
=
domainR
.
getData
();
domainMap
.
put
(
excel
.
getDeptNo
(),
selectVo
);
}
}
selectVo
=
domainR
.
getData
();
domainMap
.
put
(
excel
.
getDeptNo
(),
selectVo
);
}
}
//判断项目是否可用 (务状态:0 正常 1 停止服务 2 冻结)
//判断项目是否可用 (务状态:0 正常 1 停止服务 2 冻结)
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
selectVo
.
getStopFlag
()))
{
if
(
null
!=
selectVo
&&
!
CommonConstants
.
ZERO_STRING
.
equals
(
selectVo
.
getStopFlag
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"项目不可用!"
,
excel
));
errorList
.
add
(
"项目不可用!"
);
continue
;
}
}
//非管理员判断是否有项目权限
//非管理员判断是否有项目权限
if
(!
isAdmin
){
if
(!
isAdmin
){
if
(!
deptNos
.
contains
(
excel
.
getDeptNo
())){
if
(!
deptNos
.
contains
(
excel
.
getDeptNo
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"无项目权限!"
,
excel
));
errorList
.
add
(
"无项目权限!"
);
continue
;
}
}
}
}
...
@@ -2909,11 +3035,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -2909,11 +3035,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
}
// 插入
// 插入
EmployeeRegistration
insert
=
new
EmployeeRegistration
();
insert
=
new
EmployeeRegistration
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
BeanUtil
.
copyProperties
(
excel
,
insert
);
//表数据验重
//表数据验重
//表内数据重复 员工姓名、员工身份证号码、反馈类型、项目编码
//表内数据重复 员工姓名、员工身份证号码、反馈类型、项目编码
StringBuilder
errorTempBuilder
=
new
StringBuilder
();
errorTempBuilder
=
new
StringBuilder
();
errorTempBuilder
.
append
(
Common
.
isNullToString
(
excel
.
getDeptNo
()))
errorTempBuilder
.
append
(
Common
.
isNullToString
(
excel
.
getDeptNo
()))
.
append
(
"_"
)
.
append
(
"_"
)
.
append
(
Common
.
isNullToString
(
excel
.
getEmployeeName
()))
.
append
(
Common
.
isNullToString
(
excel
.
getEmployeeName
()))
...
@@ -2926,21 +3052,93 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -2926,21 +3052,93 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if
(
null
==
exitMap
.
get
(
duplicateKey
))
{
if
(
null
==
exitMap
.
get
(
duplicateKey
))
{
exitMap
.
put
(
duplicateKey
,
"1"
);
exitMap
.
put
(
duplicateKey
,
"1"
);
}
else
{
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
RegistConstants
.
IMPORT_EXIT_CHECK
,
excel
));
errorList
.
add
(
RegistConstants
.
IMPORT_EXIT_CHECK
);
continue
;
}
}
insert
.
setDeptNo
(
selectVo
.
getDepartNo
());
if
(
null
!=
selectVo
){
// 1.9.8:新增校验
insert
.
setDeptNo
(
selectVo
.
getDepartNo
());
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dataSource
)
}
&&
Common
.
isNotNull
(
postConfigList
)
//岗位配置校验(离职时不需要验证岗位,入职时需要校验)
if
(
CommonConstants
.
TWO_STRING
.
equals
(
dataSource
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
insert
.
getFeedbackType
())
&&
Common
.
isNotNull
(
postConfigList
)
&&
!
postConfigList
.
contains
(
insert
.
getPosition
())){
&&
!
postConfigList
.
contains
(
insert
.
getPosition
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"岗位不在项目配置的岗位配置项里"
,
excel
));
errorList
.
add
(
"岗位不在项目配置的岗位配置项里"
);
continue
;
}
}
String
error
=
registCheck
(
insert
);
//通过Pattern获得Matcher
if
(
null
!=
error
)
{
String
empIdcard
=
insert
.
getEmpIdcard
();
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
error
,
excel
));
boolean
isIdCardValid
=
true
;
if
(
Common
.
isEmpty
(
empIdcard
))
{
isIdCardValid
=
false
;
errorList
.
add
(
RegistConstants
.
IDCARD_FORMAT_ERROR
);
}
else
{
Matcher
idNumMatcher
=
idNumPattern
.
matcher
(
empIdcard
);
if
(!
idNumMatcher
.
matches
())
{
isIdCardValid
=
false
;
errorList
.
add
(
RegistConstants
.
IDCARD_FORMAT_ERROR
);
}
}
boolean
isPhoneValid
=
true
;
if
(!
ValidityUtil
.
validateEmpPhone
(
insert
.
getEmpPhone
()))
{
isPhoneValid
=
false
;
errorList
.
add
(
RegistConstants
.
PHONE_FORMAT_ERROR
);
}
//姓名、身份证+手机号真实性校验(前置条件:手机号码和身份证正常)
if
(
isIdCardValid
&&
isPhoneValid
)
{
R
<
Boolean
>
checkRes
=
checkDaprUtil
.
checkIdCardAndMobile
(
insert
.
getEmployeeName
(),
insert
.
getEmpIdcard
(),
insert
.
getEmpPhone
());
if
(
Common
.
isEmpty
(
checkRes
)
||
checkRes
.
getCode
()
!=
CommonConstants
.
SUCCESS
){
errorList
.
add
(
Common
.
isNotNull
(
checkRes
)
?
checkRes
.
getMsg
()
:
"姓名、身份证+手机号真实性校验失败"
);
}
}
//该人员入职/离职数据已登记,请勿重复操作
exit
=
baseMapper
.
selectOne
(
Wrappers
.<
EmployeeRegistration
>
query
().
lambda
()
.
eq
(
EmployeeRegistration:
:
getEmpIdcard
,
insert
.
getEmpIdcard
())
.
eq
(
EmployeeRegistration:
:
getDeptNo
,
insert
.
getDeptNo
())
.
eq
(
EmployeeRegistration:
:
getFeedbackType
,
insert
.
getFeedbackType
())
.
in
(
EmployeeRegistration:
:
getProcessStatus
,
CommonConstants
.
processStatus
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
exit
))
{
errorList
.
add
(
RegistConstants
.
REGIST_SAME_CHECK
);
}
//针对入职的判断是否存在流程中的合同待签订数据
if
(
CommonConstants
.
ONE_STRING
.
equals
(
insert
.
getFeedbackType
()))
{
EmpProjectStatusVo
vo
=
new
EmpProjectStatusVo
();
vo
.
setEmpIdcard
(
insert
.
getEmpIdcard
());
vo
.
setDeptNo
(
insert
.
getDeptNo
());
if
(
Boolean
.
TRUE
.
equals
(
checkContractPreIsExit
(
vo
)))
{
errorList
.
add
(
RegistConstants
.
EMP_CONTRACT_EXIT_CHECK
);
}
}
//针对离职的判断人员项目档案状态是否正常(前置条件:项目存在)
if
(
CommonConstants
.
TWO_STRING
.
equals
(
insert
.
getFeedbackType
())
&&
Common
.
isNotNull
(
selectVo
))
{
EmpProjectStatusVo
vo
=
new
EmpProjectStatusVo
();
vo
.
setEmpIdcard
(
insert
.
getEmpIdcard
());
vo
.
setDeptNo
(
insert
.
getDeptNo
());
EmpProjectStatusVo
exitVo
=
getEmpProjectStatus
(
vo
);
if
(
Common
.
isEmpty
(
exitVo
))
{
errorList
.
add
(
RegistConstants
.
EMP_PROJECT_EXIT_CHECK
);
}
}
//检查自动化离职未处理完毕的信息(前置条件:项目存在)
if
(
Common
.
isNotNull
(
insert
.
getEmpIdcard
())
&&
Common
.
isNotNull
(
insert
.
getDeptNo
())
&&
Common
.
isNotNull
(
selectVo
))
{
int
count
=
baseMapper
.
getEmployeeRegistrationLeavingCount
(
insert
.
getEmpIdcard
(),
insert
.
getDeptNo
());
if
(
count
>
0
)
{
errorList
.
add
(
RegistConstants
.
HAVE_LEAVING
);
}
}
//如果有错误,整合后返回
if
(!
errorList
.
isEmpty
())
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
String
.
join
(
";"
,
errorList
),
excel
));
continue
;
continue
;
}
}
// 1.9.8:新增赋值
// 1.9.8:新增赋值
...
@@ -2964,14 +3162,16 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -2964,14 +3162,16 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if
(!
Common
.
isEmpty
(
insertList
))
{
if
(!
Common
.
isEmpty
(
insertList
))
{
insertList
.
clear
();
insertList
.
clear
();
//发送企业微信待办
//发送企业微信待办
EmployeeRegistration
msgRegistration
=
new
EmployeeRegistration
();
if
(
Common
.
isNotNull
(
selectVo
))
{
msgRegistration
.
setInNum
(
inNum
);
EmployeeRegistration
msgRegistration
=
new
EmployeeRegistration
();
msgRegistration
.
setOutNum
(
outNum
);
msgRegistration
.
setInNum
(
inNum
);
msgRegistration
.
setCustomerUserLoginname
(
selectVo
.
getCsLoginName
());
msgRegistration
.
setOutNum
(
outNum
);
msgRegistration
.
setDeptName
(
selectVo
.
getDepartName
());
msgRegistration
.
setCustomerUserLoginname
(
selectVo
.
getCsLoginName
());
msgRegistration
.
setDeptNo
(
selectVo
.
getDepartNo
());
msgRegistration
.
setDeptName
(
selectVo
.
getDepartName
());
//企业微信消息提醒
msgRegistration
.
setDeptNo
(
selectVo
.
getDepartNo
());
sendMessageToWx
(
msgRegistration
,
CommonConstants
.
THREE_STRING
);
//企业微信消息提醒
sendMessageToWx
(
msgRegistration
,
CommonConstants
.
THREE_STRING
);
}
}
}
}
}
...
@@ -3030,4 +3230,202 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
...
@@ -3030,4 +3230,202 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
// res.getData() 为 true 表示是假期(非工作日),为 false 表示是工作日
// res.getData() 为 true 表示是假期(非工作日),为 false 表示是工作日
return
!
res
.
getData
();
return
!
res
.
getData
();
}
}
/**
* @Description: 确认接收时保存变更日志(只有新增,old对象为空)
* @Author: system
* @Date: 2026-04-16
* @param empPreId 入职确认信息ID
* @param preVo 入职确认信息VO
* @param user 当前用户
**/
private
void
saveConfirmReceiveLog
(
String
empPreId
,
EmployeeRegistrationPreVo
preVo
,
YifuUser
user
)
{
try
{
if
(
Common
.
isEmpty
(
empPreId
)
||
Common
.
isEmpty
(
preVo
))
{
return
;
}
String
logId
=
String
.
valueOf
(
UUID
.
randomUUID
()).
replaceAll
(
"-"
,
""
);
List
<
TEmployeePreLogDetail
>
detailList
=
new
ArrayList
<>();
StringBuilder
diffTitleBuilder
=
new
StringBuilder
();
// 1. 档案信息日志(type=1)
TEmployeePreLogDetail
archiveDetail
=
new
TEmployeePreLogDetail
();
archiveDetail
.
setModelType
(
CommonConstants
.
ONE_STRING
);
// 1新增
archiveDetail
.
setType
(
CommonConstants
.
ONE_STRING
);
// 1档案
archiveDetail
.
setPreId
(
empPreId
);
archiveDetail
.
setPreLogId
(
logId
);
archiveDetail
.
setOldInfo
(
null
);
// old对象为空
archiveDetail
.
setNewInfo
(
JSON
.
toJSONString
(
preVo
));
archiveDetail
.
setDifferenceInfo
(
null
);
archiveDetail
.
setCreateBy
(
user
.
getId
());
archiveDetail
.
setCreateName
(
user
.
getNickname
());
detailList
.
add
(
archiveDetail
);
diffTitleBuilder
.
append
(
"档案信息"
);
// 2. 商险信息日志(type=2)
if
(
preVo
.
getServerItem
()
!=
null
&&
preVo
.
getServerItem
().
contains
(
"商险"
))
{
if
(
diffTitleBuilder
.
length
()
>
0
)
{
diffTitleBuilder
.
append
(
"、"
);
}
diffTitleBuilder
.
append
(
"商险信息"
);
// 是否已购买商险
if
(
Common
.
isNotNull
(
preVo
.
getInsuranceIsBuy
()))
{
TEmployeePreLogDetail
insuranceBuyDetail
=
new
TEmployeePreLogDetail
();
insuranceBuyDetail
.
setModelType
(
CommonConstants
.
ONE_STRING
);
insuranceBuyDetail
.
setType
(
CommonConstants
.
TWO_STRING
);
// 2商险
insuranceBuyDetail
.
setPreId
(
empPreId
);
insuranceBuyDetail
.
setPreLogId
(
logId
);
insuranceBuyDetail
.
setOldInfo
(
null
);
Map
<
String
,
Object
>
newInfo
=
new
HashMap
<>();
newInfo
.
put
(
"insuranceIsBuy"
,
preVo
.
getInsuranceIsBuy
());
insuranceBuyDetail
.
setNewInfo
(
JSON
.
toJSONString
(
newInfo
));
insuranceBuyDetail
.
setDifferenceInfo
(
"insuranceIsBuy"
);
insuranceBuyDetail
.
setCreateBy
(
user
.
getId
());
insuranceBuyDetail
.
setCreateName
(
user
.
getNickname
());
detailList
.
add
(
insuranceBuyDetail
);
}
// 商险明细
if
(
Common
.
isNotNull
(
preVo
.
getEmployeeInsurancePreVos
())
&&
!
preVo
.
getEmployeeInsurancePreVos
().
isEmpty
())
{
for
(
TEmployeeInsurancePreVo
insurancePre
:
preVo
.
getEmployeeInsurancePreVos
())
{
TEmployeePreLogDetail
insuranceDetail
=
new
TEmployeePreLogDetail
();
insuranceDetail
.
setModelType
(
CommonConstants
.
ONE_STRING
);
insuranceDetail
.
setType
(
CommonConstants
.
TWO_STRING
);
insuranceDetail
.
setPreId
(
empPreId
);
insuranceDetail
.
setPreLogId
(
logId
);
insuranceDetail
.
setOldInfo
(
null
);
insuranceDetail
.
setNewInfo
(
JSON
.
toJSONString
(
insurancePre
));
// 使用 HrEquator 比较差异字段(新增时 old 为空,传入空对象)
insuranceDetail
.
setDifferenceInfo
(
null
);
insuranceDetail
.
setCreateBy
(
user
.
getId
());
insuranceDetail
.
setCreateName
(
user
.
getNickname
());
detailList
.
add
(
insuranceDetail
);
}
}
}
// 3. 合同信息日志(type=3)
if
(
preVo
.
getServerItem
()
!=
null
&&
preVo
.
getServerItem
().
contains
(
"合同"
)
&&
Common
.
isNotNull
(
preVo
.
getEmployeeContractPreVos
()))
{
if
(
diffTitleBuilder
.
length
()
>
0
)
{
diffTitleBuilder
.
append
(
"、"
);
}
diffTitleBuilder
.
append
(
"合同信息"
);
TEmployeePreLogDetail
contractDetail
=
new
TEmployeePreLogDetail
();
contractDetail
.
setModelType
(
CommonConstants
.
ONE_STRING
);
contractDetail
.
setType
(
CommonConstants
.
THREE_STRING
);
// 3合同
contractDetail
.
setPreId
(
empPreId
);
contractDetail
.
setPreLogId
(
logId
);
contractDetail
.
setOldInfo
(
null
);
contractDetail
.
setNewInfo
(
JSON
.
toJSONString
(
preVo
.
getEmployeeContractPreVos
()));
contractDetail
.
setDifferenceInfo
(
null
);
contractDetail
.
setCreateBy
(
user
.
getId
());
contractDetail
.
setCreateName
(
user
.
getNickname
());
detailList
.
add
(
contractDetail
);
}
// 4. 社保信息日志(type=4)
if
(
preVo
.
getServerItem
()
!=
null
&&
preVo
.
getServerItem
().
contains
(
"社保"
))
{
if
(
diffTitleBuilder
.
length
()
>
0
)
{
diffTitleBuilder
.
append
(
"、"
);
}
diffTitleBuilder
.
append
(
"社保信息"
);
// 是否已参保
if
(
Common
.
isNotNull
(
preVo
.
getSocialIsBuy
()))
{
TEmployeePreLogDetail
socialBuyDetail
=
new
TEmployeePreLogDetail
();
socialBuyDetail
.
setModelType
(
CommonConstants
.
ONE_STRING
);
socialBuyDetail
.
setType
(
CommonConstants
.
FOUR_STRING
);
// 4社保
socialBuyDetail
.
setPreId
(
empPreId
);
socialBuyDetail
.
setPreLogId
(
logId
);
socialBuyDetail
.
setOldInfo
(
null
);
Map
<
String
,
Object
>
newInfo
=
new
HashMap
<>();
newInfo
.
put
(
"socialIsBuy"
,
preVo
.
getSocialIsBuy
());
socialBuyDetail
.
setNewInfo
(
JSON
.
toJSONString
(
newInfo
));
socialBuyDetail
.
setDifferenceInfo
(
"socialIsBuy"
);
socialBuyDetail
.
setCreateBy
(
user
.
getId
());
socialBuyDetail
.
setCreateName
(
user
.
getNickname
());
detailList
.
add
(
socialBuyDetail
);
}
// 社保派单信息
if
(
Common
.
isNotNull
(
preVo
.
getDispatchInfoPreVo
()))
{
TEmployeePreLogDetail
socialDetail
=
new
TEmployeePreLogDetail
();
socialDetail
.
setModelType
(
CommonConstants
.
ONE_STRING
);
socialDetail
.
setType
(
CommonConstants
.
FOUR_STRING
);
socialDetail
.
setPreId
(
empPreId
);
socialDetail
.
setPreLogId
(
logId
);
socialDetail
.
setOldInfo
(
null
);
socialDetail
.
setNewInfo
(
JSON
.
toJSONString
(
preVo
.
getDispatchInfoPreVo
()));
socialDetail
.
setDifferenceInfo
(
null
);
socialDetail
.
setCreateBy
(
user
.
getId
());
socialDetail
.
setCreateName
(
user
.
getNickname
());
detailList
.
add
(
socialDetail
);
}
}
// 5. 公积金信息日志(type=5)
if
(
preVo
.
getServerItem
()
!=
null
&&
preVo
.
getServerItem
().
contains
(
"公积金"
))
{
if
(
diffTitleBuilder
.
length
()
>
0
)
{
diffTitleBuilder
.
append
(
"、"
);
}
diffTitleBuilder
.
append
(
"公积金信息"
);
// 是否已参保
if
(
Common
.
isNotNull
(
preVo
.
getFundIsBuy
()))
{
TEmployeePreLogDetail
fundBuyDetail
=
new
TEmployeePreLogDetail
();
fundBuyDetail
.
setModelType
(
CommonConstants
.
ONE_STRING
);
fundBuyDetail
.
setType
(
CommonConstants
.
FIVE_STRING
);
// 5公积金
fundBuyDetail
.
setPreId
(
empPreId
);
fundBuyDetail
.
setPreLogId
(
logId
);
fundBuyDetail
.
setOldInfo
(
null
);
Map
<
String
,
Object
>
newInfo
=
new
HashMap
<>();
newInfo
.
put
(
"fundIsBuy"
,
preVo
.
getFundIsBuy
());
fundBuyDetail
.
setNewInfo
(
JSON
.
toJSONString
(
newInfo
));
fundBuyDetail
.
setDifferenceInfo
(
"fundIsBuy"
);
fundBuyDetail
.
setCreateBy
(
user
.
getId
());
fundBuyDetail
.
setCreateName
(
user
.
getNickname
());
detailList
.
add
(
fundBuyDetail
);
}
// 公积金派单信息
if
(
Common
.
isNotNull
(
preVo
.
getDispatchInfoFundPreVo
()))
{
TEmployeePreLogDetail
fundDetail
=
new
TEmployeePreLogDetail
();
fundDetail
.
setModelType
(
CommonConstants
.
ONE_STRING
);
fundDetail
.
setType
(
CommonConstants
.
FIVE_STRING
);
fundDetail
.
setPreId
(
empPreId
);
fundDetail
.
setPreLogId
(
logId
);
fundDetail
.
setOldInfo
(
null
);
fundDetail
.
setNewInfo
(
JSON
.
toJSONString
(
preVo
.
getDispatchInfoFundPreVo
()));
fundDetail
.
setDifferenceInfo
(
null
);
fundDetail
.
setCreateBy
(
user
.
getId
());
fundDetail
.
setCreateName
(
user
.
getNickname
());
detailList
.
add
(
fundDetail
);
}
}
// 保存日志主表和明细
if
(!
detailList
.
isEmpty
())
{
TEmployeePreLog
empPreLog
=
new
TEmployeePreLog
();
empPreLog
.
setId
(
logId
);
empPreLog
.
setPreId
(
empPreId
);
empPreLog
.
setDiffTitle
(
diffTitleBuilder
.
toString
());
if
(
Common
.
isNotNull
(
user
))
{
empPreLog
.
setCreateBy
(
user
.
getId
());
empPreLog
.
setCreateName
(
user
.
getNickname
());
}
// 通过Dapr调用档案服务保存日志
archivesDaprUtil
.
savePreLogBatch
(
Collections
.
singletonList
(
empPreLog
));
// 保存日志明细
archivesDaprUtil
.
savePreLogDetailBatch
(
detailList
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"保存确认接收日志异常"
,
e
);
}
}
}
}
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