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
ce123c42
Commit
ce123c42
authored
Aug 03, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
8499e9fb
381076c4
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
325 additions
and
179 deletions
+325
-179
TEmployeeContractInfo.java
...d/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
+1
-1
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+2
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+3
-3
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+8
-0
TInsuranceDetail.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
+1
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+179
-75
TDispatchInfo.java
.../yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
+2
-2
TSocialInfo.java
...om/yifu/cloud/plus/v1/yifu/social/entity/TSocialInfo.java
+16
-0
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+102
-93
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+7
-3
TSocialFundInfoMapper.xml
...l-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
+1
-1
TSocialInfoMapper.xml
...ocial-biz/src/main/resources/mapper/TSocialInfoMapper.xml
+3
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
View file @
ce123c42
...
...
@@ -389,8 +389,8 @@ public class TEmployeeContractInfo extends BaseEntity {
/**
* 最新审核通过时间
*/
@DateTimeFormat
(
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"最新审核通过时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
auditTimeLast
;
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
ce123c42
...
...
@@ -2113,6 +2113,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
c
)){
c
.
setAuditStatus
(
CommonConstants
.
TWO_INT
);
c
.
setInUse
(
CommonConstants
.
ZERO_STRING
);
contractServicer
.
updateById
(
c
);
}
...
...
@@ -2165,6 +2166,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
contract
.
setAuditStatus
(
CommonConstants
.
ONE_INT
);
contract
.
setApplyNo
(
contractServicer
.
getCode
(
false
));
contract
.
setInUse
(
CommonConstants
.
ONE_STRING
);
contractServicer
.
save
(
contract
);
contractAdd
.
setId
(
contract
.
getId
());
contractAdd
.
setEmpNo
(
contract
.
getEmpNo
());
...
...
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
ce123c42
...
...
@@ -117,11 +117,11 @@ emp.dispatch.fund.not.empty=\u6D3E\u5355\u5458\u5DE5\u516C\u79EF\u91D1\u76F8\u51
emp.dispatch.social.existing
=
\u
65B0
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
5DF2
\u
5B58
\u5728\u
793E
\u
4FDD
\u6570\u
636E
emp.dispatch.social.injury.existing
=
\u
65B0
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
5B58
\u5728\u
529E
\u7406\u6210\u
529F
\u
672A
\u
6D3E
\u
51CF
\u7684\u
5DE5
\u
4F24
\u
793E
\u
4FDD
\u6570\u
636E
emp.dispatch.social.injury.existing
=
\u
65B0
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
5B58
\u5728\u
672A
\u
6D3E
\u
51CF
\u7684\u
5DE5
\u
4F24
\u
793E
\u
4FDD
\u6570\u
636E
emp.dispatch.social.not.reduce
=
\u
65B0
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
5B58
\u5728\u
529E
\u7406\u6210\u
529F
\u
672A
\u
6D3E
\u
51CF
\u7684\u
4E94
\u9669\u
793E
\u
4FDD
\u6570\u
636E
\u
FF0C
\u7981\u
6B62
\u
65B0
\u
589E
\u
5DE5
\u
4F24
emp.dispatch.social.not.reduce
=
\u
65B0
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
5B58
\u5728\u
672A
\u
6D3E
\u
51CF
\u7684\u
4E94
\u9669\u
793E
\u
4FDD
\u6570\u
636E
\u
FF0C
\u7981\u
6B62
\u
65B0
\u
589E
\u
5DE5
\u
4F24
emp.dispatch.social.injury.not.reduce
=
\u
65B0
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
5B58
\u5728\u
529E
\u7406\u6210\u
529F
\u
672A
\u
6D3E
\u
51CF
\u7684\u
5DE5
\u
4F24
\u
793E
\u
4FDD
\u6570\u
636E
\u
FF0C
\u7981\u
6B62
\u
65B0
\u
589E
\u
4E94
\u9669
emp.dispatch.social.injury.not.reduce
=
\u
65B0
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
5B58
\u5728\u
672A
\u
6D3E
\u
51CF
\u7684\u
5DE5
\u
4F24
\u
793E
\u
4FDD
\u6570\u
636E
\u
FF0C
\u7981\u
6B62
\u
65B0
\u
589E
\u
4E94
\u9669
emp.dispatch.social.hold.not.exist
=
\u
65B0
\u
589E
\u
5F02
\u
5E38
\u
FF1A
\u
672A
\u
627E
\u5230\u
5BF9
\u
5E94
\u
793E
\u
4FDD
\u6237\u
540D
\u
79F0
\u7684\u
53EF
\u7528\u
57FA
\u6570\u
914D
\u
7F6E
\u
4FE1
\u
606F
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
ce123c42
...
...
@@ -92,10 +92,18 @@ public class InsurancesConstants {
* 项目编码不存在
*/
public
static
final
String
DEPT_NO_IS_NOT_EXIST
=
"项目编码不存在"
;
/**
* 替换员工项目不存在
*/
public
static
final
String
REPLACE_DEPT_NO_IS_NOT_EXIST
=
"替换员工项目不存在"
;
/**
* 未找到项目的结算方式
*/
public
static
final
String
PROJECT_NOT_FIND_SETTLE_TYPE
=
"未找到项目的结算方式"
;
/**
* 根据替换员工的项目,未找到项目的结算方式
*/
public
static
final
String
REPLACE_PROJECT_NOT_FIND_SETTLE_TYPE
=
"根据替换员工的项目,未找到项目的结算方式"
;
/**
* 替换员工投保记录已存在
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
View file @
ce123c42
...
...
@@ -248,6 +248,7 @@ public class TInsuranceDetail extends BaseEntity {
* 是否有效 0有效 1无效
*/
@Schema
(
description
=
"是否有效 0有效 1无效"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Integer
isEffect
;
/**
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
ce123c42
...
...
@@ -29,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -52,6 +53,7 @@ import java.util.stream.Collectors;
* @date 2022-07-18 16:20:16
*/
@Service
@Slf4j
public
class
TInsuranceDetailServiceImpl
extends
ServiceImpl
<
TInsuranceDetailMapper
,
TInsuranceDetail
>
implements
TInsuranceDetailService
{
@Resource
@Lazy
...
...
@@ -92,7 +94,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Override
public
void
updateOverdueByTask
()
{
//todo
// 获取未失效的所有明细数据
List
<
TInsuranceDetail
>
list
=
this
.
baseMapper
.
selectList
(
Wrappers
.<
TInsuranceDetail
>
query
().
lambda
()
.
eq
(
TInsuranceDetail:
:
getIsEffect
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
log
.
info
(
"定时任务扫描到的有效数据是:{}条"
,
list
.
size
());
list
.
stream
().
forEach
(
e
->
{
if
(!
LocalDateUtil
.
isFutureDate
(
e
.
getPolicyEnd
().
toString
())){
e
.
setIsEffect
(
CommonConstants
.
ONE_INT
);
e
.
setUpdateTime
(
LocalDateTime
.
now
());
}
});
List
<
TInsuranceDetail
>
collect
=
list
.
stream
().
filter
(
e
->
e
.
getIsEffect
()
==
CommonConstants
.
ONE_INT
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
collect
)){
log
.
info
(
"定时任务扫描到的已失效数据是:{}条"
,
collect
.
size
());
this
.
updateBatchById
(
collect
);
}
}
}
/**
...
...
@@ -408,6 +428,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
failed
(
InsurancesConstants
.
DATA_IS_NOT_EXIST
);
}
if
(
byId
.
getBuyHandleStatus
()
==
CommonConstants
.
FOUR_INT
&&
byId
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
){
//新增、批增的编辑逻辑
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
return
R
.
failed
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
...
...
@@ -559,7 +581,56 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
byId
.
setUpdateBy
(
user
.
getId
());
byId
.
setUpdateTime
(
LocalDateTime
.
now
());
this
.
updateById
(
byId
);
}
else
{
}
else
if
(
byId
.
getBuyHandleStatus
()
==
CommonConstants
.
FOUR_INT
&&
byId
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
){
//替换的编辑逻辑
// 身份证号位数校验(18 位合法)
if
(!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
return
R
.
failed
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
}
//校验身份合法
/*TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo());
R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
if (null != tCheckIdCardR && tCheckIdCardR.getCode() == CommonConstants.SUCCESS){
TCheckIdCard data = tCheckIdCardR.getData();
if (CommonConstants.ONE_INT != data.getIsTrue()){
return R.failed(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT);
}
}*/
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
byId
.
getId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
TInsuranceDetail
insuranceDetail
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
if
(
insuranceDetail
.
getIsUse
()
==
CommonConstants
.
ONE_INT
){
return
R
.
failed
(
"员工"
+
insuranceDetail
.
getEmpName
()+
"的投保记录已出险,无法替换"
);
}
if
(
insuranceDetail
.
getIsEffect
()
==
CommonConstants
.
ONE_INT
){
return
R
.
failed
(
"员工"
+
insuranceDetail
.
getEmpName
()+
"的投保记录无效,无法替换"
);
}
//被替换者无效
insuranceDetail
.
setIsEffect
(
CommonConstants
.
ONE_INT
);
this
.
updateById
(
insuranceDetail
);
//替换记录成功
one
.
setReplaceStatus
(
CommonConstants
.
ONE_INT
);
tInsuranceReplaceService
.
updateById
(
one
);
//替换状态下目前只能编辑姓名、身份证、岗位
//投保状态:待投保
byId
.
setBuyHandleStatus
(
CommonConstants
.
ONE_INT
);
byId
.
setEmpName
(
param
.
getEmpName
());
byId
.
setEmpIdcardNo
(
param
.
getEmpIdcardNo
());
byId
.
setPost
(
param
.
getPost
());
byId
.
setUpdateBy
(
user
.
getId
());
byId
.
setUpdateTime
(
LocalDateTime
.
now
());
this
.
updateById
(
byId
);
}
}
}
else
{
return
R
.
failed
(
InsurancesConstants
.
EDIT_NOT_ALLOW
);
}
//操作记录
...
...
@@ -685,6 +756,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listVO
.
setErrorMessage
(
InsurancesConstants
.
REDUCE_ROLLBACK_REDUCE_IS_NOT_ALLOW
);
errorList
.
add
(
listVO
);
}
else
{
//判断是否是替换类型的退回,如果是,需要将被替换者激活,替换者有效状态为空
if
(
detail
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
){
//替换者有效状态为空
detail
.
setIsEffect
(
null
);
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
detail
.
getId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
()){
//替换记录变为失败
one
.
setReplaceStatus
(
CommonConstants
.
ZERO_INT
);
tInsuranceReplaceService
.
updateById
(
one
);
TInsuranceDetail
byId
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
if
(
Optional
.
ofNullable
(
byId
).
isPresent
()){
//被替换者激活
byId
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
this
.
updateById
(
byId
);
}
}
}
// 记录状态置为「退回」
detail
.
setBuyHandleStatus
(
CommonConstants
.
FOUR_INT
);
detail
.
setUpdateBy
(
user
.
getId
());
...
...
@@ -763,6 +855,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listVO
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_BUY_STATUS_NOT_TWO
);
errorList
.
add
(
listVO
);
}
else
{
//替换类型不参与结算
if
(
detail
.
getBuyType
()
==
CommonConstants
.
FOUR_INT
){
//记录状态均置为「已投保」
detail
.
setBuyHandleStatus
(
CommonConstants
.
THREE_INT
);
detail
.
setSignFlag
(
CommonConstants
.
ONE_INT
);
//记录的有效状态,置为「有效」
detail
.
setIsEffect
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsOverdue
(
CommonConstants
.
ZERO_INT
);
detail
.
setIsUse
(
CommonConstants
.
ZERO_INT
);
successList
.
add
(
detail
);
}
else
{
//根据结算类型判断是否需要计算预估保费
//预估
if
(
detail
.
getSettleType
()
==
CommonConstants
.
ZERO_INT
){
...
...
@@ -848,6 +951,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
//更新
this
.
saveOrUpdateBatch
(
successList
);
...
...
@@ -1813,24 +1917,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//根据项目编码查询项目是否存在
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
param
.
getDeptNo
()));
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
param
.
get
Replace
DeptNo
()));
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
)
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
MapUtils
.
isEmpty
(
data
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_
DEPT_NO_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
ProjectSetInfoVo
projectSetInfoVo
=
data
.
get
(
param
.
getDeptNo
());
ProjectSetInfoVo
projectSetInfoVo
=
data
.
get
(
param
.
get
Replace
DeptNo
());
if
(
null
==
projectSetInfoVo
){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_
DEPT_NO_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
//结算类型,根据项目编码获取,并冗余到明细记录中
String
settleType
=
projectSetInfoVo
.
getInsuranceSettleType
();
if
(
StringUtils
.
isEmpty
(
settleType
)){
param
.
setErrorMessage
(
InsurancesConstants
.
PROJECT_NOT_FIND_SETTLE_TYPE
);
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_
PROJECT_NOT_FIND_SETTLE_TYPE
);
listResult
.
add
(
param
);
continue
;
}
else
{
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
View file @
ce123c42
...
...
@@ -365,11 +365,11 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty
(
"社保办理状态"
)
private
String
socialHandleStatus
;
/**
* 公积金办理状态:0 未办理 1办理成功 2 办理失败
3 已派减
* 公积金办理状态:0 未办理 1办理成功 2 办理失败
*/
@Length
(
max
=
1
,
message
=
"公积金办理状态 不能超过1个字符"
)
@ExcelAttribute
(
name
=
"公积金办理状态"
,
maxLength
=
1
)
@Schema
(
description
=
"公积金办理状态:0 未办理 1办理成功 2 办理失败
3 已派减
"
)
@Schema
(
description
=
"公积金办理状态:0 未办理 1办理成功 2 办理失败 "
)
@ExcelProperty
(
"公积金办理状态"
)
private
String
fundHandleStatus
;
/**
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialInfo.java
View file @
ce123c42
...
...
@@ -763,4 +763,20 @@ public class TSocialInfo extends BaseEntity {
@ExcelProperty
(
"基数下限(社保或公积金)"
)
private
BigDecimal
lowerLimit
;
/**
* 单位社保合计
*/
@ExcelAttribute
(
name
=
"单位社保合计"
)
@Schema
(
description
=
"单位社保合计"
)
@ExcelProperty
(
"单位社保合计"
)
private
BigDecimal
unitSocialSum
;
/**
* 个人社保合计
*/
@ExcelAttribute
(
name
=
"个人社保合计"
)
@Schema
(
description
=
"个人社保合计"
)
@ExcelProperty
(
"个人社保合计"
)
private
BigDecimal
personalSocialSum
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
ce123c42
...
...
@@ -329,7 +329,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
DispatchEmpVo
empVo
=
null
;
SysBaseSetInfo
socialSet
;
SysBaseSetInfo
fundSet
;
ProjectSetInfoVo
setInfoVo
;
ProjectSetInfoVo
setInfoVo
=
null
;
TSocialFundInfo
socialFund
;
TDispatchImportVo
excel
;
EmpDispatchAddVo
addVo
=
new
EmpDispatchAddVo
();
...
...
@@ -343,11 +343,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
empVoMap
))
{
empVo
=
empVoMap
.
get
(
excel
.
getEmpIdcard
());
}
// 数据合法情况
if
(
validImport
(
errorMessageList
,
excel
,
setInfoVo
,
socialFundMap
,
empVo
,
socialSet
,
fundSet
))
{
excelVOTemp
.
put
(
excel
.
getEmpIdcard
(),
excel
.
getEmpIdcard
());
continue
;
}
if
(
Common
.
isNotNull
(
excel
.
getSocialHousehold
())){
if
(
Common
.
isEmpty
(
socialSet
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_HOLD_NOT_EXIST
)));
...
...
@@ -362,6 +357,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue
;
}
}
// 数据合法情况
if
(
validImport
(
errorMessageList
,
excel
,
setInfoVo
,
socialFundMap
,
empVo
,
socialSet
,
fundSet
))
{
excelVOTemp
.
put
(
excel
.
getEmpIdcard
(),
excel
.
getEmpIdcard
());
continue
;
}
// 是否可以派单: 派单状态、兼职工伤处理
if
(
validDdispatchStatus
(
errorMessageList
,
socialFundMap
,
excel
))
{
excelVOTemp
.
put
(
excel
.
getEmpIdcard
(),
excel
.
getEmpIdcard
());
...
...
@@ -386,7 +386,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
addVo
.
setProjectsMap
(
projectsMap
);
R
<
EmpDispatchAddVo
>
res
=
archivesDaprUtil
.
addDispatchInfo
(
addVo
);
// 开始插入各种数据了
insertAllInfo
(
excelVOList
,
errorMessageList
,
empVoMap
,
res
,
socialsMap
,
fundsMap
,
socialFundAddMap
,
dispatchMap
,
excelVOTemp
);
insertAllInfo
(
excelVOList
,
errorMessageList
,
setInfoVo
,
res
,
socialsMap
,
fundsMap
,
socialFundAddMap
,
dispatchMap
,
excelVOTemp
);
// 清理map list 等数据
Common
.
clear
(
excelVOList
);
Common
.
clear
(
empAddsMap
);
...
...
@@ -415,7 +415,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private
void
insertAllInfo
(
List
<
TDispatchImportVo
>
excelVOList
,
List
<
ErrorMessage
>
errorMessageList
,
Map
<
String
,
DispatchEmpVo
>
empVoMap
,
ProjectSetInfoVo
setInfoVo
,
R
<
EmpDispatchAddVo
>
res
,
Map
<
String
,
TSocialInfo
>
socialsMap
,
Map
<
String
,
TProvidentFund
>
fundsMap
,
...
...
@@ -495,7 +495,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setEmpNo
(
project
.
getEmpNo
());
}
}
insertDispatch
(
emp
,
dispatch
);
insertDispatch
(
emp
,
dispatch
,
setInfoVo
);
}
// 插入或更新社保公积金查询信息 大病在封装社保的时候已经算了 大病技术和金额了
if
(
Common
.
isNotNull
(
socialFundAddMap
)){
...
...
@@ -514,7 +514,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"派单新增异常:"
+
e
.
getMessage
()));
continue
;
}
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
,
CommonConstants
.
GREEN
));
//
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS,CommonConstants.GREEN));
}
// 清理map list 等数据
Common
.
clear
(
empAddsMap
);
...
...
@@ -542,13 +542,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
private
void
insertDispatch
(
EmpAddDispatchVo
emp
,
TDispatchInfo
dispatch
)
{
private
void
insertDispatch
(
EmpAddDispatchVo
emp
,
TDispatchInfo
dispatch
,
ProjectSetInfoVo
setInfoVo
)
{
if
(
Common
.
isNotNull
(
dispatch
)){
if
(
Common
.
isNotNull
(
emp
)){
dispatch
.
setEmpId
(
emp
.
getId
());
dispatch
.
setSettleDomainCode
(
emp
.
getDeptNo
());
dispatch
.
setSettleDomain
(
emp
.
getDeptId
());
dispatch
.
setSettleDomainName
(
emp
.
getDeptName
());
}
if
(
Common
.
isNotNull
(
setInfoVo
)){
dispatch
.
setSettleDomainName
(
setInfoVo
.
getDepartName
());
dispatch
.
setSettleDomainCode
(
setInfoVo
.
getDepartNo
());
dispatch
.
setSettleDomain
(
setInfoVo
.
getId
());
}
dispatch
.
setCreateTime
(
LocalDateTime
.
now
());
baseMapper
.
insert
(
dispatch
);
...
...
@@ -820,7 +822,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TDispatchInfo
dispatch
;
dispatch
=
new
TDispatchInfo
();
// 初始化派单项
initAddHandleItem
(
excel
,
socialFund
,
dispatch
);
initAddHandleItem
(
excel
,
socialFund
,
dispatch
,
socialSet
);
dispatch
.
setOrganName
(
user
.
getDeptName
());
dispatch
.
setCreateBy
(
user
.
getId
());
dispatch
.
setCreateTime
(
LocalDateTime
.
now
());
...
...
@@ -834,8 +836,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setType
(
CommonConstants
.
ZERO_STRING
);
dispatch
.
setCurrentOperator
(
user
.
getNickname
());
dispatch
.
setTrustRemark
(
excel
.
getTrustRemark
());
dispatch
.
setFundHandleStatus
(
CommonConstants
.
ZERO_STRING
);
if
(
Common
.
isNotNull
(
excel
.
getSocialHousehold
())){
dispatch
.
setSocialHandleStatus
(
CommonConstants
.
ZERO_STRING
);
}
if
(
Common
.
isNotNull
(
excel
.
getProvidentHousehold
())){
dispatch
.
setFundHandleStatus
(
CommonConstants
.
ZERO_STRING
);
}
if
(
Common
.
isNotNull
(
socialSet
)){
dispatch
.
setSocialProvince
(
Common
.
isNotNullToStr
(
socialSet
.
getProvince
()));
dispatch
.
setSocialCity
(
Common
.
isNotNullToStr
(
socialSet
.
getCity
()));
...
...
@@ -850,8 +856,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setStatus
(
CommonConstants
.
ONE_STRING
);
dispatch
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
// 封装项目客户信息
dispatch
.
setSettleDomainName
(
excel
.
getDepartName
());
dispatch
.
setSettleDomain
(
excel
.
getSettleDomainId
());
dispatch
.
setBelongUnit
(
excel
.
getCustomerId
());
dispatch
.
setBelongUnitName
(
excel
.
getCustomerName
());
dispatch
.
setEducationName
(
excel
.
getEducationName
());
...
...
@@ -871,7 +875,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setEmpId
(
empVo
.
getId
());
dispatch
.
setEmpNo
(
empVo
.
getEmpNo
());
// 封装合同信息 如果有合同取值实际合同信息
dispatch
.
setSettleDomainName
(
empVo
.
getDeptName
());
dispatch
.
setContractStart
(
empVo
.
getContractStart
());
dispatch
.
setContractEnd
(
empVo
.
getContractEnd
());
dispatch
.
setContractTerm
(
empVo
.
getContractTerm
());
...
...
@@ -880,9 +883,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setFileCity
(
empVo
.
getFileCity
());
dispatch
.
setFileTown
(
empVo
.
getFileTown
());
dispatch
.
setContractId
(
empVo
.
getContractId
());
if
(
Common
.
isNotNull
(
empVo
.
getEmpNatrue
())){
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
()));
...
...
@@ -895,7 +898,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatchMap
.
put
(
excel
.
getEmpIdcard
(),
dispatch
);
}
private
void
initAddHandleItem
(
TDispatchImportVo
excel
,
TSocialFundInfo
socialFund
,
TDispatchInfo
dispatch
)
{
private
void
initAddHandleItem
(
TDispatchImportVo
excel
,
TSocialFundInfo
socialFund
,
TDispatchInfo
dispatch
,
SysBaseSetInfo
socialSet
)
{
StringBuffer
temp
=
new
StringBuffer
();
if
(
Common
.
isEmpty
(
socialFund
)){
if
(
Common
.
isNotNull
(
excel
.
getSocialHousehold
())){
...
...
@@ -914,7 +917,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
excel
.
getUnemployStart
())){
temp
.
append
(
DispatchConstants
.
DISPATCH_UNEMP
);
}
if
(
Common
.
isNotNull
(
excel
.
getBigailmentStart
())){
if
(
Common
.
isNotNull
(
excel
.
getBigailmentStart
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialSet
.
getIsIllness
())){
temp
.
append
(
DispatchConstants
.
DISPATCH_BIGMAILMENT
);
}
}
...
...
@@ -945,8 +949,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFund
.
getUnemployHandle
())){
temp
.
append
(
DispatchConstants
.
DISPATCH_UNEMP
);
}
if
(
CommonConstants
.
TWO_STRING
.
equals
(
socialFund
.
getBigailmentHandle
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFund
.
getBigailmentHandle
())){
if
((
CommonConstants
.
TWO_STRING
.
equals
(
socialFund
.
getBigailmentHandle
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFund
.
getBigailmentHandle
()))
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialSet
.
getIsIllness
())){
temp
.
append
(
DispatchConstants
.
DISPATCH_BIGMAILMENT
);
}
}
...
...
@@ -1112,13 +1117,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
social
.
setPersonalPensionCardinal
(
excel
.
getPensionCardinal
());
social
.
setPersonalMedicalCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getMedicalCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setPersonalUnemploymentCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getUnemploymentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setPersonalBigailmentCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getBigailmentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitPensionCardinal
(
excel
.
getPensionCardinal
());
social
.
setUnitMedicalCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getMedicalCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitUnemploymentCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getUnemploymentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitWorkInjuryCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getWorkInjuryCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitBigailmentCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getBigailmentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitBirthCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getBirthCardinal
(),
excel
.
getPensionCardinal
()));
}
// 获取到政策后封装相关数据
...
...
@@ -1148,44 +1151,61 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
social
.
setPersonalPensionPer
(
socialSet
.
getPersonalPersionPro
());
social
.
setPersonalMedicalPer
(
socialSet
.
getPersonalMedicalPro
());
social
.
setPersonalUnemploymentPer
(
socialSet
.
getPersonalUnemploymentPro
());
social
.
setPersonalBigailmentPer
(
socialSet
.
getPayPersonalPro
());
social
.
setUnitPensionPer
(
socialSet
.
getUnitPersionPro
());
social
.
setUnitMedicalPer
(
socialSet
.
getUnitMedicalPro
());
social
.
setUnitUnemploymentPer
(
socialSet
.
getUnitUnemploymentPro
());
social
.
setUnitWorkUnjuryPer
(
socialSet
.
getUnitInjuryPro
());
social
.
setUnitBigailmentPer
(
socialSet
.
getPayCompanyPro
());
social
.
setUnitBirthPer
(
socialSet
.
getUnitBirthPro
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
social
.
getIsIllness
())){
social
.
setPersonalBigailmentCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getBigailmentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitBigailmentCardinal
(
ServiceUtil
.
ifNull
(
excel
.
getBigailmentCardinal
(),
excel
.
getPensionCardinal
()));
social
.
setUnitBigailmentPer
(
socialSet
.
getPayCompanyPro
());
social
.
setPersonalBigailmentPer
(
socialSet
.
getPayPersonalPro
());
}
//按最低
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
excel
.
getPaymentType
())){
social
.
setPersonalPensionCardinal
(
socialSet
.
getLowerLimit
());
social
.
setPersonalMedicalCardinal
(
socialSet
.
getLowerLimit
());
social
.
setPersonalUnemploymentCardinal
(
socialSet
.
getLowerLimit
());
social
.
setPersonalBigailmentCardinal
(
socialSet
.
getLowerLimit
());
social
.
setUnitPensionCardinal
(
socialSet
.
getLowerLimit
());
social
.
setUnitMedicalCardinal
(
socialSet
.
getLowerLimit
());
social
.
setUnitUnemploymentCardinal
(
socialSet
.
getLowerLimit
());
social
.
setUnitWorkInjuryCardinal
(
socialSet
.
getLowerLimit
());
social
.
setUnitBigailmentCardinal
(
socialSet
.
getLowerLimit
());
social
.
setUnitBirthCardinal
(
socialSet
.
getLowerLimit
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
social
.
getIsIllness
())){
social
.
setUnitBigailmentCardinal
(
socialSet
.
getLowerLimit
());
social
.
setPersonalBigailmentCardinal
(
socialSet
.
getLowerLimit
());
}
}
//按最高
if
(
CommonConstants
.
TWO_STRING
.
equals
(
excel
.
getPaymentType
())){
social
.
setPersonalPensionCardinal
(
socialSet
.
getUpperLimit
());
social
.
setPersonalMedicalCardinal
(
socialSet
.
getUpperLimit
());
social
.
setPersonalUnemploymentCardinal
(
socialSet
.
getUpperLimit
());
social
.
setPersonalBigailmentCardinal
(
socialSet
.
getUpperLimit
());
social
.
setUnitPensionCardinal
(
socialSet
.
getUpperLimit
());
social
.
setUnitMedicalCardinal
(
socialSet
.
getUpperLimit
());
social
.
setUnitUnemploymentCardinal
(
socialSet
.
getUpperLimit
());
social
.
setUnitWorkInjuryCardinal
(
socialSet
.
getUpperLimit
());
social
.
setUnitBigailmentCardinal
(
socialSet
.
getUpperLimit
());
social
.
setUnitBirthCardinal
(
socialSet
.
getUpperLimit
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
social
.
getIsIllness
())){
social
.
setPersonalBigailmentCardinal
(
socialSet
.
getUpperLimit
());
social
.
setUnitBigailmentCardinal
(
socialSet
.
getUpperLimit
());
}
}
}
social
.
setUnitPersionMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitPensionCardinal
(),
social
.
getUnitPensionPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
social
.
setUnitMedicalMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitMedicalCardinal
(),
social
.
getUnitMedicalPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
social
.
setUnitBirthMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitBirthCardinal
(),
social
.
getUnitBirthPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
social
.
setUnitInjuryMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitWorkInjuryCardinal
(),
social
.
getUnitWorkUnjuryPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
social
.
setUnitUnemploymentMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getUnitUnemploymentCardinal
(),
social
.
getUnitUnemploymentPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
social
.
setPersonalPersionMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getPersonalPensionCardinal
(),
social
.
getPersonalPensionPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
social
.
setPersonalMedicalMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getPersonalMedicalCardinal
(),
social
.
getPersonalMedicalPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
social
.
setPersonalUnemploymentMoney
(
BigDecimalUtils
.
safeMultiply
(
social
.
getPersonalUnemploymentCardinal
(),
social
.
getPersonalUnemploymentPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())));
boolean
flag
=
CommonConstants
.
ZERO_STRING
.
equals
(
social
.
getIsIllness
())
&&
(
CommonConstants
.
ZERO_STRING
.
equals
(
social
.
getCollectType
())||
CommonConstants
.
ONE_STRING
.
equals
(
social
.
getCollectType
()));
if
(
flag
)
{
//收取方式按年 且为指定月份时产生数据
...
...
@@ -1215,6 +1235,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
}
social
.
setUnitSocialSum
(
BigDecimalUtils
.
safeAdd
(
social
.
getUnitPersionMoney
()
,
social
.
getUnitMedicalMoney
(),
social
.
getUnitBirthMoney
()
,
social
.
getUnitInjuryMoney
()
,
social
.
getUnitUnemploymentMoney
()
,
social
.
getUnitBigailmentMoney
()));
social
.
setPersonalSocialSum
(
BigDecimalUtils
.
safeAdd
(
social
.
getPersonalBigailmentMoney
()
,
social
.
getPersonalPersionMoney
()
,
social
.
getPersonalMedicalMoney
()
,
social
.
getPersonalUnemploymentMoney
()));
// 处理部分办理失败的情况
initHandleStatus
(
excel
,
socialFundMap
,
social
);
socials
.
put
(
excel
.
getEmpIdcard
(),
social
);
...
...
@@ -1330,6 +1359,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
contract
.
setSituation
(
excel
.
getContractType
());
contract
.
setEmpIdcard
(
excel
.
getEmpIdcard
());
contract
.
setEmpName
(
excel
.
getEmpName
());
contract
.
setWorkingHours
(
excel
.
getWorkingHours
());
if
(
Common
.
isNotNull
(
excel
.
getSocialHousehold
())){
contract
.
setContractParty
(
excel
.
getSocialHousehold
());
}
...
...
@@ -1344,7 +1374,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
empVo
))
{
contract
.
setEmpId
(
empVo
.
getId
());
contract
.
setEmpNo
(
empVo
.
getEmpNo
());
if
(
Common
.
isNotNull
(
empVo
.
getEmpNatrue
())){
contract
.
setEmpType
(
empVo
.
getEmpNatrue
());
}
contract
.
setFileProvince
(
empVo
.
getFileProvince
());
contract
.
setFileCity
(
empVo
.
getFileCity
());
contract
.
setFileTown
(
empVo
.
getFileTown
());
...
...
@@ -1440,24 +1472,29 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return
true
;
}
// 拒绝新增2:新增兼职工伤---有兼职工伤不可重复增、
if
(
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
excel
.
getPensionCardinal
()))
==
0
)
{
// 有兼职工伤不可重复增 (未派减成功不可新增兼职工伤,但是可以新增五险)
if
(
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
sf
.
getUnitPensionCardinal
()))
==
0
if
(
Common
.
isEmpty
(
excel
.
getPensionCardinal
())
||
BigDecimal
.
ZERO
.
compareTo
(
excel
.
getPensionCardinal
())
==
0
)
{
// 有兼职工伤不可重复增 (未派减成功不可新增兼职工伤)
if
((
Common
.
isEmpty
(
sf
.
getUnitPensionCardinal
())
||
BigDecimal
.
ZERO
.
compareTo
(
sf
.
getUnitPensionCardinal
())
==
0
)
&&
Common
.
isNotNull
(
sf
.
getSocialReduceStatus
())
&&
!
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getSocialReduceStatus
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_INJURY_EXISTING
)));
return
true
;
}
// 有五险未派减不给新增兼职工伤
if
(
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
sf
.
getUnitPensionCardinal
()))
!=
0
if
(
Common
.
isNotNull
(
sf
.
getUnitPensionCardinal
())
&&
BigDecimal
.
ZERO
.
compareTo
(
sf
.
getUnitPensionCardinal
())
!=
0
&&
Common
.
isEmpty
(
sf
.
getSocialReduceStatus
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_NOT_REDUCE
)));
return
true
;
}
}
// 拒绝新增3:新增五险对应兼职工伤逻辑---有兼职工伤未派减不给增五险、
if
(
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
excel
.
getPensionCardinal
()))
!=
0
)
{
if
(
Common
.
isNotNull
(
excel
.
getPensionCardinal
())
&&
BigDecimal
.
ZERO
.
compareTo
(
excel
.
getPensionCardinal
())
!=
0
)
{
// 有兼职工伤未派减不给增五险
if
(
BigDecimal
.
ZERO
.
compareTo
(
BigDecimalUtils
.
isNullToZero
(
sf
.
getUnitPensionCardinal
()
))
==
0
if
(
BigDecimal
.
ZERO
.
compareTo
(
sf
.
getUnitPensionCardinal
(
))
==
0
&&
Common
.
isEmpty
(
sf
.
getSocialReduceStatus
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_INJURY_NOT_REDUCE
)));
return
true
;
...
...
@@ -1587,7 +1624,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excel
.
setContractEnd
(
empVo
.
getContractEnd
());
excel
.
setContractType
(
empVo
.
getContractType
());
excel
.
setContractSubName
(
empVo
.
getContractSubName
());
excel
.
setContractName
(
empVo
.
get
Emp
Name
());
excel
.
setContractName
(
empVo
.
get
Contract
Name
());
excel
.
setContractTerm
(
empVo
.
getContractTerm
());
}
}
...
...
@@ -1601,7 +1638,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
EMP_DISPATCH_SOCIAL_AND_FUND_NOT_EMPTY
)));
return
true
;
}
if
(
Common
.
isNotNull
(
excel
.
getContractName
())
&&
(
if
((
Common
.
isEmpty
(
empVo
)
||
Common
.
isEmpty
(
empVo
.
getContractStart
()))
&&
Common
.
isNotNull
(
excel
.
getContractName
())
&&
(
Common
.
isEmpty
(
excel
.
getContractSubName
())
||
Common
.
isEmpty
(
excel
.
getContractType
())
||
Common
.
isEmpty
(
excel
.
getContractStart
())
...
...
@@ -1637,7 +1675,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
TSocialFundInfo
socialFund
;
if
(
Common
.
isNotNull
(
socialFundMap
)){
if
(
Common
.
isNotNull
(
socialFundMap
)
&&
Common
.
isNotNull
(
excel
.
getSocialHousehold
())
){
socialFund
=
socialFundMap
.
get
(
excel
.
getEmpIdcard
());
if
(
Common
.
isNotNull
(
socialFund
)){
// 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败 10 审核不通过-增)
...
...
@@ -2021,7 +2059,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getUnemployHandle
())){
temp
.
append
(
DispatchConstants
.
DISPATCH_UNEMP
);
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getBigailmentHandle
())){
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFund
.
getBigailmentHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialFund
.
getIsIllness
())
){
temp
.
append
(
DispatchConstants
.
DISPATCH_BIGMAILMENT
);
}
}
...
...
@@ -2049,7 +2089,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setEmpId
(
empVo
.
getId
());
dispatch
.
setEmpNo
(
empVo
.
getEmpCode
());
// 封装合同信息 如果有合同取值实际合同信息
dispatch
.
setSettleDomainName
(
empVo
.
getDeptName
());
dispatch
.
setContractStart
(
empVo
.
getContractStart
());
dispatch
.
setContractEnd
(
empVo
.
getContractEnd
());
dispatch
.
setContractTerm
(
empVo
.
getContractTerm
());
...
...
@@ -2057,8 +2096,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setFileProvince
(
empVo
.
getFileProvince
());
dispatch
.
setFileCity
(
empVo
.
getFileCity
());
dispatch
.
setFileTown
(
empVo
.
getFileTown
());
dispatch
.
setSettleDomainCode
(
empVo
.
getDeptNo
());
dispatch
.
setSettleDomain
(
empVo
.
getDeptId
());
}
return
dispatch
;
}
...
...
@@ -2718,10 +2755,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//派减判断
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
dis
.
getType
()))
{
if
(
!((
Common
.
isNotNull
(
socialInfo
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getHandleStatus
())
||
CommonConstants
.
FOUR_STRING
.
equals
(
socialInfo
.
getHandleStatus
()))
&&
(
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getHandleStatus
())
||
CommonConstants
.
FOUR_STRING
.
equals
(
socialInfo
.
getHandleStatus
()))
)
||
(
Common
.
isEmpty
(
providentFund
)
&&
CommonConstants
.
ZERO_STRING
.
equals
(
providentFund
.
getHandleStatus
())))
&&
(
Common
.
isEmpty
(
providentFund
)
||
CommonConstants
.
ZERO_STRING
.
equals
(
providentFund
.
getHandleStatus
()))))
)
{
//办理成功或失败 更新为办理完结 2020-05-26
dis
.
setStatus
(
CommonConstants
.
FOUR_STRING
);
...
...
@@ -2738,6 +2776,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
auditInfo
.
setEmpIdcard
(
dis
.
getEmpIdcard
());
auditInfoMapper
.
insert
(
auditInfo
);
baseMapper
.
updateById
(
dis
);
socialFundMapper
.
updateById
(
sf
);
}
else
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"派单数据错误!"
));
}
...
...
@@ -2805,7 +2844,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private
void
setSocialHandleStatus
(
String
handleStatus
,
String
socialType
,
int
flag
,
TSocialInfo
socialInfo
,
TDispatchInfo
dis
,
TSocialFundInfo
sf
)
{
// 批量办理,或者办理选择对应的类型,修改对应的办理状态
this
.
setSocialSixStatus
(
handleStatus
,
socialType
,
socialInfo
);
this
.
setSocialSixStatus
(
handleStatus
,
socialType
,
socialInfo
,
sf
);
// HandleStatus办理状态 0 未办理 1 全部办理成功(原-已办理) 2 全部办理失败(原-办理失败) 3已派减 4办理中 5部分办理失败
// 派减,审核不通过,社保状态不变更
...
...
@@ -2839,45 +2878,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
// 2.派增处理 socialType 社保拆分的每一项(1养老 2医疗 3失业 4工伤 5生育 6大病)
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dis
.
getType
())){
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
dis
.
getType
())
&&
Common
.
isNotNull
(
dis
.
getSocialId
())
){
//办理成功 flag=0 办理失败 flag=1
// 有对应办理项且 对应项为待办理或者空时更新 下同
if
(
socialType
.
indexOf
(
CommonConstants
.
ONE_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getPensionHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getPensionHandle
()))){
socialInfo
.
setPensionHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setPensionHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
if
(
socialType
.
indexOf
(
CommonConstants
.
TWO_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getMedicalHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getMedicalHandle
()))){
socialInfo
.
setMedicalHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setMedicalHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
if
(
socialType
.
indexOf
(
CommonConstants
.
THREE_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getUnemployHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getUnemployHandle
()))){
socialInfo
.
setUnemployHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setUnemployHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
if
(
socialType
.
indexOf
(
CommonConstants
.
FOUR_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getWorkInjuryHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getWorkInjuryHandle
()))){
socialInfo
.
setWorkInjuryHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setWorkInjuryHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
if
(
socialType
.
indexOf
(
CommonConstants
.
FIVE_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getBirthHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getBirthHandle
()))){
socialInfo
.
setBirthHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setBirthHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
if
(
socialType
.
indexOf
(
CommonConstants
.
SIX_STRING
)
>
CommonConstants
.
ZERO_INT
&&
(
Common
.
isEmpty
(
socialInfo
.
getBigailmentHandle
())
||
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getBigailmentHandle
()))){
socialInfo
.
setBigailmentHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
sf
.
setBigailmentHandle
(
ifNotEquals
(
CommonConstants
.
ZERO_INT
,
flag
,
CommonConstants
.
ONE_STRING
,
CommonConstants
.
TWO_STRING
));
}
// 派增:
if
((
Common
.
isEmpty
(
socialInfo
.
getPensionHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getPensionHandle
()))
&&
(
Common
.
isEmpty
(
socialInfo
.
getMedicalHandle
())
||
CommonConstants
.
ONE_STRING
.
equals
(
socialInfo
.
getMedicalHandle
()))
...
...
@@ -2942,41 +2944,48 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @param handleStatus
* @param socialType
* @param socialInfo
* @param sf
* @Description: 填充社保的新的六个状态字段
* @Author: hgw
* @Date: 2021/6/9 17:12
* @return: void
**/
private
void
setSocialSixStatus
(
String
handleStatus
,
String
socialType
,
TSocialInfo
socialInfo
)
{
private
void
setSocialSixStatus
(
String
handleStatus
,
String
socialType
,
TSocialInfo
socialInfo
,
TSocialFundInfo
sf
)
{
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
ONE_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getPensionHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getPensionHandle
()))
{
socialInfo
.
setPensionHandle
(
handleStatus
);
sf
.
setPensionHandle
(
handleStatus
);
}
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
TWO_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getMedicalHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getMedicalHandle
()))
{
socialInfo
.
setMedicalHandle
(
handleStatus
);
sf
.
setMedicalHandle
(
handleStatus
);
}
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
THREE_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getUnemployHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getUnemployHandle
()))
{
socialInfo
.
setUnemployHandle
(
handleStatus
);
sf
.
setUnemployHandle
(
handleStatus
);
}
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
FOUR_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getWorkInjuryHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getWorkInjuryHandle
()))
{
socialInfo
.
setWorkInjuryHandle
(
handleStatus
);
sf
.
setWorkInjuryHandle
(
handleStatus
);
}
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
FIVE_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getBirthHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getBirthHandle
()))
{
socialInfo
.
setBirthHandle
(
handleStatus
);
sf
.
setBirthHandle
(
handleStatus
);
}
if
((
Common
.
isEmpty
(
socialType
)
||
socialType
.
contains
(
CommonConstants
.
SIX_STRING
))
&&
Common
.
isNotNull
(
socialInfo
.
getBigailmentHandle
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
socialInfo
.
getBigailmentHandle
()))
{
socialInfo
.
setBigailmentHandle
(
handleStatus
);
sf
.
setBigailmentHandle
(
handleStatus
);
}
}
/**
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
ce123c42
...
...
@@ -394,6 +394,10 @@
<if
test=
"tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''"
>
AND f.PROVIDENT_HOUSEHOLD_NAME = #{tDispatchInfo.providentHouseholdName}
</if>
<if
test=
"tDispatchInfo.createTimes != null and tDispatchInfo.createTimes.length>0"
>
AND a.UPDATE_TIME
<![CDATA[ >= ]]>
#{tDispatchInfo.createTimes[0]}
AND a.UPDATE_TIME
<![CDATA[ <= ]]>
#{tDispatchInfo.createTimes[1]}
</if>
</if>
</sql>
<!--tDispatchInfo简单分页查询-->
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
View file @
ce123c42
...
...
@@ -386,7 +386,7 @@
a.PERSONAL_INTEREST_FEE,
a.SOCIAL_STATUS,
a.FUND_STATUS,
a.DISPATCH_ID
a.DISPATCH_ID
,a.UNIT_SOCIAL_SUM,a.PERSONAL_SOCIAL_SUM
</sql>
<sql
id=
"tSocialFundInfo_where"
>
<if
test=
"tSocialFundInfo != null"
>
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialInfoMapper.xml
View file @
ce123c42
...
...
@@ -123,6 +123,8 @@
<result
property=
"payPolicy"
column=
"PAY_POLICY"
/>
<result
property=
"lowerLimit"
column=
"LOWER_LIMIT"
/>
<result
property=
"upperLimit"
column=
"UPPER_LIMIT"
/>
<result
property=
"unitSocialSum"
column=
"UNIT_SOCIAL_SUM"
/>
<result
property=
"personalSocialSum"
column=
"PERSONAL_SOCIAL_SUM"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -225,7 +227,7 @@
a.UPDATE_TIME,
a.PAY_POLICY,
a.LOWER_LIMIT,
a.UPPER_LIMIT
a.UPPER_LIMIT
,a.UNIT_SOCIAL_SUM,a.PERSONAL_SOCIAL_SUM
</sql>
<sql
id=
"tSocialInfo_where"
>
<if
test=
"tSocialInfo != null"
>
...
...
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