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
5bcdad22
Commit
5bcdad22
authored
Jul 29, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量办理 100%
parent
b4afd0dd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
87 additions
and
8 deletions
+87
-8
TEmployeeContractInfo.java
...d/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
+6
-0
TEmployeeContractInfoController.java
.../archives/controller/TEmployeeContractInfoController.java
+2
-2
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+2
-0
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+10
-2
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+3
-0
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+1
-1
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+63
-3
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
View file @
5bcdad22
...
...
@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
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.ExcelAttributeConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
...
...
@@ -110,12 +111,14 @@ public class TEmployeeContractInfo extends BaseEntity {
@NotBlank
(
message
=
"合同起始时间不能为空"
)
@ExcelAttribute
(
name
=
"合同起始时间"
,
needExport
=
true
)
@Schema
(
description
=
"合同起始时间"
,
name
=
"contractStart"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+08:00"
)
private
Date
contractStart
;
/**
* 合同到期时间
*/
@ExcelAttribute
(
name
=
"合同到期时间"
,
needExport
=
true
)
@Schema
(
description
=
"合同到期时间"
,
name
=
"contractEnd"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+08:00"
)
private
Date
contractEnd
;
/**
* 项目名称
...
...
@@ -204,6 +207,7 @@ public class TEmployeeContractInfo extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"入职日期"
)
@Schema
(
description
=
"入职日期"
,
name
=
"enjoinDate"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
enjoinDate
;
/**
...
...
@@ -291,12 +295,14 @@ public class TEmployeeContractInfo extends BaseEntity {
*/
@ExcelAttribute
(
name
=
"试用期开始时间"
)
@Schema
(
description
=
"合同试用期开始时间"
,
name
=
"periodStart"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
periodStart
;
/**
* 合同试用期结束时间
*/
@ExcelAttribute
(
name
=
"试用期结束时间"
)
@Schema
(
description
=
"合同试用期结束时间"
,
name
=
"periodEnd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
periodEnd
;
/**
* 试用期工资元/月
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractInfoController.java
View file @
5bcdad22
...
...
@@ -291,7 +291,7 @@ public class TEmployeeContractInfoController {
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询员工合同"
)
@Inner
@PostMapping
(
"/getContractById"
)
public
R
<
TEmployeeContractInfo
>
getContractById
(
@RequestBody
String
id
)
{
return
R
.
ok
(
tEmployeeContractInfoService
.
getById
(
id
)
);
public
TEmployeeContractInfo
getContractById
(
@RequestBody
String
id
)
{
return
tEmployeeContractInfoService
.
getById
(
id
);
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
5bcdad22
...
...
@@ -420,6 +420,8 @@ public interface CommonConstants {
public
static
final
int
TWENTY_INT
=
20
;
public
static
final
int
TWENTY_ONE_STRING
=
21
;
public
static
final
String
ERROR_MSG_PRFIX
=
"error="
;
public
static
final
String
SUCCESS_MSG_PREFIX
=
"success="
;
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
5bcdad22
...
...
@@ -449,11 +449,19 @@ public interface ErrorCodes {
*/
String
EMP_DISPATCH_SOCIAL_DATE_LIMIT_ERROR
=
"emp.dispatch.social.date.limit.error"
;
/**
* 派增异常: 社保各项起缴月份需为可补缴月份,请确认后操作
!
* 派增异常: 社保各项起缴月份需为可补缴月份,请确认后操作
*/
String
EMP_DISPATCH_SOCIAL_START_IS_ERROR
=
"emp.dispatch.social.start.is.error"
;
/**
* 派增异常: 公积金起缴月份需为可补缴月份,请确认后操作
!
* 派增异常: 公积金起缴月份需为可补缴月份,请确认后操作
*/
String
EMP_DISPATCH_FUND_DATE_LIMIT_ERROR
=
"emp.dispatch.fund.start.is.error"
;
/**
* 派增异常: 合同相关信息不可为空
*/
String
EMP_DISPATCH_EMP_CONTRACT_NOT_EMPTY
=
"emp.dispatch.emp.contract.not.empty"
;
/**
* 派增异常: 系统无对应项目档案,档案相关同色字段必填
*/
String
EMP_DISPATCH_EMP_NOT_EMPTY
=
"emp.dispatch.emp.not.empty"
;
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
5bcdad22
...
...
@@ -171,6 +171,9 @@ emp.dispatch.social.start.is.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u
emp.dispatch.fund.start.is.error
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
516C
\u
79EF
\u
91D1
\u
8D77
\u
7F34
\u6708\u
4EFD
\u9700\u
4E3A
\u
53EF
\u8865\u
7F34
\u6708\u
4EFD
\u
FF0C
\u
8BF7
\u
786E
\u
8BA4
\u
540E
\u
64CD
\u
4F5C
\u
FF01
emp.dispatch.emp.contract.not.empty
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u5408\u
540C
\u
76F8
\u5173\u
4FE1
\u
606F
\u
4E0D
\u
53EF
\u
4E3A
\u
7A7A
emp.dispatch.emp.not.empty
=
\u
6D3E
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
7CFB
\u
7EDF
\u
65E0
\u
5BF9
\u
5E94
\u9879\u
76EE
\u6863\u6848\u
FF0C
\u6863\u6848\u
76F8
\u5173\u
540C
\u8272\u
5B57
\u
6BB5
\u
5FC5
\u
586B
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
5bcdad22
...
...
@@ -156,7 +156,7 @@ public class ArchivesDaprUtil {
public
R
<
TEmployeeContractInfo
>
getContractById
(
String
id
)
{
R
<
TEmployeeContractInfo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
()
,
"/temployee
info/inner
/getContractById"
,
id
,
TEmployeeContractInfo
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/temployee
contractinfo
/getContractById"
,
id
,
TEmployeeContractInfo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取档案信息失败!"
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
5bcdad22
...
...
@@ -761,7 +761,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TDispatchInfo
dispatch
;
dispatch
=
new
TDispatchInfo
();
dispatch
.
setOrganName
(
user
.
getDeptName
());
dispatch
.
setCreateBy
(
user
.
get
Nickname
());
dispatch
.
setCreateBy
(
user
.
get
Id
());
dispatch
.
setCreateTime
(
LocalDateTime
.
now
());
dispatch
.
setContractSubName
(
excel
.
getContractSubName
());
dispatch
.
setContractName
(
excel
.
getContractName
());
...
...
@@ -821,6 +821,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setFileTown
(
empVo
.
getFileTown
());
dispatch
.
setContractId
(
empVo
.
getContractId
());
dispatch
.
setEmpType
(
empVo
.
getEmpNatrue
());
dispatch
.
setSettleDomainCode
(
empVo
.
getDeptNo
());
dispatch
.
setSettleDomain
(
empVo
.
getDeptId
());
if
(
Common
.
isNotNull
(
empVo
.
getIdProvince
())){
dispatch
.
setIdCardProvince
(
Common
.
isNotNullToStr
(
empVo
.
getIdProvince
()));
dispatch
.
setIdCardCity
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
...
...
@@ -846,6 +848,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
empVo
)){
fund
.
setEmpId
(
empVo
.
getId
());
fund
.
setEmpNo
(
empVo
.
getEmpNo
());
fund
.
setSettleDomain
(
empVo
.
getDeptId
());
}
fund
.
setEmpIdcard
(
excel
.
getEmpIdcard
());
fund
.
setEmpName
(
excel
.
getEmpName
());
...
...
@@ -1144,7 +1147,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
.
eq
(
SysBaseSetInfo:
:
getBaseType
,
CommonConstants
.
ZERO_STRING
)
.
le
(
SysBaseSetInfo:
:
getApplyStartDate
,
now
)
.
in
(
SysBaseSetInfo:
:
getDepartName
,
socialholds
)
.
eq
(
SysBaseSetInfo:
:
getStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
SysBaseSetInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
and
(
obj
->
obj
.
isNotNull
(
SysBaseSetInfo:
:
getApplyEndDate
).
or
().
ge
(
SysBaseSetInfo:
:
getApplyEndDate
,
now
))
.
groupBy
(
SysBaseSetInfo:
:
getDepartName
));
if
(
Common
.
isNotNull
(
socialBases
))
{
for
(
SysBaseSetInfo
set:
socialBases
){
...
...
@@ -1354,6 +1359,27 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_PROJECT_NOT_FOUND
)));
return
true
;
}
if
(
Common
.
isEmpty
(
empVo
)){
if
(
Common
.
isEmpty
(
excel
.
getFileProvince
())
||
Common
.
isEmpty
(
excel
.
getFileCity
())
||
Common
.
isEmpty
(
excel
.
getWorkingHours
())
||
Common
.
isEmpty
(
excel
.
getEmpNational
())
||
Common
.
isEmpty
(
excel
.
getEmpMobile
())
||
Common
.
isEmpty
(
excel
.
getEmpType
())
||
Common
.
isEmpty
(
excel
.
getPost
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_NOT_EMPTY
)));
return
true
;
}
if
(
Common
.
isEmpty
(
excel
.
getContractName
())
&&
validContractInfo
(
errorMessageList
,
excel
,
empVo
)){
return
true
;
}
}
/*项目档案有可用状态的合同:
不对合同做判断,取值:项目档案的合同;
项目档案无可用状态的合同:
合同类型必填、业务细分(合同类型为其他时必填)、签订期限必填
签订期限:无固定期限 合同到期时间、合同期限非必填,合同开始时间必填;
签订期限:固定期限、已完成一定工作任务为期限 合同期限非必填,合同开始时间、合同到期时间都必填*/
if
(
Common
.
isNotNull
(
empVo
)){
if
(
CommonConstants
.
ONE_STRING
.
equals
(
empVo
.
getProjectStatus
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_PROJECT_NOT_USED
)));
...
...
@@ -1363,8 +1389,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_NOT_USED
)));
return
true
;
}
if
(
Common
.
isEmpty
(
empVo
.
getContractStart
())
&&
Common
.
isEmpty
(
excel
.
getContractStart
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_NOT_USED
)));
// 档案无合同 合同起日期、合同类型必填
if
(
Common
.
isEmpty
(
empVo
.
getContractName
())
&&
validContractInfo
(
errorMessageList
,
excel
,
empVo
)){
return
true
;
}
excel
.
setEmpType
(
empVo
.
getEmpNatrue
());
...
...
@@ -1375,6 +1401,17 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excel
.
setIdCardProvince
(
Common
.
isNotNullToStr
(
empVo
.
getIdProvince
()));
excel
.
setIdCardCity
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
excel
.
setIdCardTown
(
Common
.
isNotNullToStr
(
empVo
.
getIdCity
()));
excel
.
setEmpNational
(
empVo
.
getEmpNational
());
excel
.
setEmpRegisType
(
empVo
.
getEmpRegisType
());
excel
.
setPost
(
empVo
.
getPost
());
if
(
Common
.
isNotNull
(
empVo
.
getContractStart
())){
excel
.
setContractStart
(
empVo
.
getContractStart
());
excel
.
setContractEnd
(
empVo
.
getContractEnd
());
excel
.
setContractType
(
empVo
.
getContractType
());
excel
.
setContractSubName
(
empVo
.
getContractSubName
());
excel
.
setContractName
(
empVo
.
getEmpName
());
excel
.
setContractTerm
(
empVo
.
getContractTerm
());
}
}
excel
.
setSettleDomainId
(
setInfoVo
.
getId
());
excel
.
setDepartName
(
setInfoVo
.
getDepartName
());
...
...
@@ -1473,6 +1510,29 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
return
false
;
}
private
boolean
validContractInfo
(
List
<
ErrorMessage
>
errorMessageList
,
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
){
// 合同起缴时间、合同类型、签订期限必填
if
((
Common
.
isEmpty
(
excel
.
getContractStart
())
||
Common
.
isEmpty
(
excel
.
getContractType
())
||
Common
.
isEmpty
(
excel
.
getContractName
()))){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_CONTRACT_NOT_EMPTY
)));
return
true
;
}
// 业务细分(合同类型为其他时必填)
if
(
excel
.
getContractType
().
equals
(
CommonConstants
.
TWENTY_ONE_STRING
)
&&
Common
.
isEmpty
(
excel
.
getContractSubName
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_CONTRACT_NOT_EMPTY
)));
return
true
;
}
// 签订期限:固定期限、已完成一定工作任务为期限 合同期限非必填,合同开始时间、合同到期时间都必填
if
((
excel
.
getContractType
().
equals
(
CommonConstants
.
ONE_STRING
)
||
excel
.
getContractType
().
equals
(
CommonConstants
.
ZERO_STRING
))
&&
Common
.
isEmpty
(
excel
.
getContractEnd
())){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_EMP_CONTRACT_NOT_EMPTY
)));
return
true
;
}
return
false
;
}
private
boolean
validSocialBaseInfo
(
List
<
ErrorMessage
>
errorMessageList
,
TDispatchImportVo
excel
,
DispatchEmpVo
empVo
,
SysBaseSetInfo
socialSet
)
{
if
(
Common
.
isNotNull
(
socialSet
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
excel
.
getPaymentType
())
...
...
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