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
a7038b59
Commit
a7038b59
authored
Aug 05, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature-zhaji
parents
0f6a4098
f3ca4cb3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
141 additions
and
91 deletions
+141
-91
PreDispatchConstants.java
...d/plus/v1/yifu/social/constants/PreDispatchConstants.java
+0
-1
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+136
-79
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+5
-11
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/constants/PreDispatchConstants.java
View file @
a7038b59
...
...
@@ -45,5 +45,4 @@ public class PreDispatchConstants {
public
static
final
String
NO_SOCIAL_FUND_ADDRESS_REDUCE
=
"派减:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!"
;
public
static
final
String
GET_AREA_INFO
=
"获取区域数据失败!"
;
public
static
final
String
TEL_NOT_EMPTY
=
"联系电话2不可为空!"
;
public
static
final
String
TEL_INVALID
=
"联系电话2无效!"
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
a7038b59
...
...
@@ -393,7 +393,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
library
.
setPersonalPensionFee
(
BigDecimalUtils
.
safeAdd
(
libraryOld
.
getPersonalPensionFee
(),
library
.
getPersonalPensionFee
()));
library
.
setPersonalMedicalFee
(
BigDecimalUtils
.
safeAdd
(
libraryOld
.
getPersonalMedicalFee
(),
library
.
getPersonalMedicalFee
()));
library
.
setPersonalUnemploymentFee
(
BigDecimalUtils
.
safeAdd
(
libraryOld
.
getPersonalUnemploymentFee
(),
library
.
getPersonalUnemploymentFee
()));
library
.
setPersonalInterestFee
(
BigDecimalUtils
.
safeAdd
(
libraryOld
.
getPersonal
UnemploymentFee
(),
library
.
getPersonalUnemploymen
tFee
()));
library
.
setPersonalInterestFee
(
BigDecimalUtils
.
safeAdd
(
libraryOld
.
getPersonal
InterestFee
(),
library
.
getPersonalInteres
tFee
()));
library
.
setPersonalBigailmentFee
(
BigDecimalUtils
.
safeAdd
(
libraryOld
.
getPersonalBigailmentFee
(),
library
.
getPersonalBigailmentFee
()));
library
.
setPersonalSocialSum
(
BigDecimalUtils
.
safeAdd
(
libraryOld
.
getPersonalSocialSum
(),
library
.
getPersonalSocialSum
()));
// 单位公积金
...
...
@@ -403,34 +403,36 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
/**
* @param
socialFund
* @param
libraryNew
* @param libraryOld
* @Description: 获取变更的部分
* @Author: hgw
* @Date: 2022/7/20 11:29
* @return: void
**/
private
void
getChangeReduceData
(
TSocialFundInfo
socialFund
,
TForecastLibrary
libraryOld
)
{
private
void
getChangeReduceData
(
TForecastLibrary
libraryNew
,
TForecastLibrary
libraryOld
)
{
//单位社保
library
Old
.
setUnitPensionFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getUnitPersionMoney
(),
libraryOld
.
getUnitPensionFee
()));
library
Old
.
setUnitMedicalFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getUnitMedicalMoney
(),
libraryOld
.
getUnitMedicalFee
()));
library
Old
.
setUnitBirthFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getUnitBirthMoney
(),
libraryOld
.
getUnitBirthFee
()));
library
Old
.
setUnitWorkInjuryFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getUnitInjuryMoney
(),
libraryOld
.
getUnitWorkInjuryFee
()));
library
Old
.
setUnitUnemploymentFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getUnitUnemploymentMoney
(),
libraryOld
.
getUnitUnemploymentFee
()));
library
Old
.
setUnitBitailmentFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getUnitBigailmentMoney
(),
libraryOld
.
getUnitBitailmentFee
()));
library
Old
.
setUnitInterestFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getUnitInterestFee
(),
libraryOld
.
getUnitInterestFee
()));
library
Old
.
setUnitSocialSum
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getUnitSocialSum
(),
libraryOld
.
getUnitSocialSum
()));
library
New
.
setUnitPensionFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getUnitPensionFee
(),
libraryOld
.
getUnitPensionFee
()));
library
New
.
setUnitMedicalFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getUnitMedicalFee
(),
libraryOld
.
getUnitMedicalFee
()));
library
New
.
setUnitBirthFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getUnitBirthFee
(),
libraryOld
.
getUnitBirthFee
()));
library
New
.
setUnitWorkInjuryFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getUnitWorkInjuryFee
(),
libraryOld
.
getUnitWorkInjuryFee
()));
library
New
.
setUnitUnemploymentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getUnitUnemploymentFee
(),
libraryOld
.
getUnitUnemploymentFee
()));
library
New
.
setUnitBitailmentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getUnitBitailmentFee
(),
libraryOld
.
getUnitBitailmentFee
()));
library
New
.
setUnitInterestFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getUnitInterestFee
(),
libraryOld
.
getUnitInterestFee
()));
library
New
.
setUnitSocialSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getUnitSocialSum
(),
libraryOld
.
getUnitSocialSum
()));
// 个人社保
library
Old
.
setPersonalPensionFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getPersonalPersionMoney
(),
libraryOld
.
getPersonalPensionFee
()));
library
Old
.
setPersonalMedicalFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getPersonalMedicalMoney
(),
libraryOld
.
getPersonalMedicalFee
()));
library
Old
.
setPersonalUnemploymentFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getPersonalUnemploymentMoney
(),
libraryOld
.
getPersonalUnemploymentFee
()));
library
Old
.
setPersonalInterestFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getPersonalUnemploymentMoney
(),
libraryOld
.
getPersonalUnemploymen
tFee
()));
library
Old
.
setPersonalBigailmentFee
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getPersonalBigailmentMoney
(),
libraryOld
.
getPersonalBigailmentFee
()));
library
Old
.
setPersonalSocialSum
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getPersonalSocialSum
(),
libraryOld
.
getPersonalSocialSum
()));
library
New
.
setPersonalPensionFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getPersonalPensionFee
(),
libraryOld
.
getPersonalPensionFee
()));
library
New
.
setPersonalMedicalFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getPersonalMedicalFee
(),
libraryOld
.
getPersonalMedicalFee
()));
library
New
.
setPersonalUnemploymentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getPersonalUnemploymentFee
(),
libraryOld
.
getPersonalUnemploymentFee
()));
library
New
.
setPersonalInterestFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getPersonalInterestFee
(),
libraryOld
.
getPersonalInteres
tFee
()));
library
New
.
setPersonalBigailmentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getPersonalBigailmentFee
(),
libraryOld
.
getPersonalBigailmentFee
()));
library
New
.
setPersonalSocialSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getPersonalSocialSum
(),
libraryOld
.
getPersonalSocialSum
()));
// 单位公积金
library
Old
.
setUnitFundSum
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getUnitFundSum
(),
libraryOld
.
getUnitFundSum
()));
library
New
.
setUnitFundSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getUnitFundSum
(),
libraryOld
.
getUnitFundSum
()));
// 个人公积金
libraryOld
.
setPersonalFundSum
(
BigDecimalUtils
.
safeSubtract
(
socialFund
.
getPersonalFundSum
(),
libraryOld
.
getPersonalFundSum
()));
libraryNew
.
setPersonalFundSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getPersonalFundSum
(),
libraryOld
.
getPersonalFundSum
()));
libraryNew
.
setSumAll
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getSumAll
(),
libraryOld
.
getSumAll
()));
}
...
...
@@ -451,12 +453,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
private
void
initSocialLibary
(
String
diffType
,
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
tSocialInfo
,
boolean
isReduceFund
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
,
TForecastLibrary
lib
,
String
sfMapKey
,
TForecastLibrary
historyLibrary
)
{
if
(
null
==
lib
)
{
lib
=
new
TForecastLibrary
();
}
else
if
(
Common
.
isNotNull
(
lib
.
getId
()))
{
lib
.
setId
(
null
);
}
,
String
sfMapKey
,
TForecastLibrary
historyLibrary
)
{
TForecastLibrary
lib
=
new
TForecastLibrary
();
lib
.
setDataPush
(
CommonConstants
.
ZERO_INT
);
lib
.
setSocialHousehold
(
tSocialInfo
.
getSocialHousehold
());
lib
.
setSocialHouseholdName
(
tSocialInfo
.
getSocialHouseholdName
());
...
...
@@ -1250,13 +1248,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @Date 2020-07-21
**/
private
void
initFundLibary
(
String
diffType
,
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
providentFund
,
boolean
isReduceSocial
,
TForecastLibrary
lib
,
String
mapKeyStr
,
TSocialFundInfo
providentFund
,
boolean
isReduceSocial
,
String
mapKeyStr
,
TForecastLibrary
historyLibrary
)
{
if
(
lib
==
null
)
{
lib
=
new
TForecastLibrary
();
}
else
if
(
Common
.
isNotNull
(
lib
.
getId
()))
{
lib
.
setId
(
null
);
}
TForecastLibrary
lib
=
new
TForecastLibrary
();
lib
.
setDataPush
(
CommonConstants
.
ZERO_INT
);
lib
.
setProvidentHousehold
(
providentFund
.
getProvidentHousehold
());
lib
.
setProvidentHouseholdName
(
providentFund
.
getProvidentHouseholdName
());
...
...
@@ -1489,38 +1483,50 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
@Override
public
R
<
String
>
updateForecastLibaryByDispatchReduce
(
TSocialFundInfo
socialFundInfo
)
{
String
empIdCard
=
socialFundInfo
.
getEmpIdcard
();
Date
socialReduceDate
=
socialFundInfo
.
getSocialReduceDate
();
Date
fundReduceDate
=
socialFundInfo
.
getFundReduceDate
();
if
(
socialReduceDate
==
null
&&
fundReduceDate
==
null
)
{
return
R
.
failed
(
"社保、公积金减少日期不能都为空!"
);
}
// 查询已经生成的预估数据
List
<
TForecastLibrary
>
socialLibraryList
=
null
;
List
<
TForecastLibrary
>
fundLibraryList
=
null
;
if
(
Common
.
isNotNull
(
empIdCard
))
{
Date
minStartDate
=
this
.
getMinSocialDate
(
socialFundInfo
);
BigDecimal
zero
=
BigDecimal
.
ZERO
;
if
(
socialReduceDate
!=
null
)
{
socialLibraryList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
socialLibraryList
))
{
for
(
TForecastLibrary
library
:
socialLibraryList
)
{
// 存在社保派减且处于派减期间内,未被预估结算,工资结算引用则清空相关数据
if
(
Common
.
isNotNull
(
library
.
getSocialPayMonth
())
&&
DateUtil
.
formatDateInt
(
socialReduceDate
)
<
Integer
.
parseInt
(
library
.
getSocialPayMonth
()))
{
this
.
calculateType
(
zero
,
library
);
// 查询已经生成的预估数据
List
<
TForecastLibrary
>
socialLibraryList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isNotNull
(
socialLibraryList
))
{
// 社保
Date
socialReduceDate
=
socialFundInfo
.
getSocialReduceDate
();
for
(
TForecastLibrary
library
:
socialLibraryList
)
{
if
(
Common
.
isNotNull
(
library
.
getSocialPayMonth
()))
{
if
(
socialReduceDate
!=
null
)
{
// 存在社保派减且处于派减期间内,未被预估结算,工资结算引用则清空相关数据
if
(
DateUtil
.
formatDateInt
(
socialReduceDate
)
<
Integer
.
parseInt
(
library
.
getSocialPayMonth
()))
{
this
.
calculateSocialType
(
zero
,
library
);
}
}
else
{
if
(
DateUtil
.
formatDateInt
(
minStartDate
)
<=
Integer
.
parseInt
(
library
.
getSocialPayMonth
()))
{
this
.
calculateSocialType
(
zero
,
library
);
}
}
}
}
}
if
(
socialReduceDate
!=
null
)
{
fundLibraryList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
));
if
(
Common
.
isNotNull
(
fundLibraryList
))
{
for
(
TForecastLibrary
library
:
fundLibraryList
)
{
// 存在社保派减且处于派减期间内,未被预估结算,工资结算引用则清空相关数据
if
(
Common
.
isNotNull
(
library
.
getProvidentPayMonth
())
&&
DateUtil
.
formatDateInt
(
fundReduceDate
)
<
Integer
.
parseInt
(
library
.
getProvidentPayMonth
()))
{
this
.
calculateType
(
zero
,
library
);
// 公积金
List
<
TForecastLibrary
>
fundLibraryList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
));
if
(
Common
.
isNotNull
(
fundLibraryList
))
{
minStartDate
=
socialFundInfo
.
getProvidentStart
();
Date
fundReduceDate
=
socialFundInfo
.
getFundReduceDate
();
for
(
TForecastLibrary
library
:
fundLibraryList
)
{
if
(
Common
.
isNotNull
(
library
.
getProvidentPayMonth
()))
{
if
(
fundReduceDate
!=
null
)
{
// 存在社保派减且处于派减期间内,未被预估结算,工资结算引用则清空相关数据
if
(
DateUtil
.
formatDateInt
(
fundReduceDate
)
<
Integer
.
parseInt
(
library
.
getProvidentPayMonth
()))
{
this
.
calculateFundType
(
zero
,
library
);
}
}
else
{
if
(
DateUtil
.
formatDateInt
(
minStartDate
)
<=
Integer
.
parseInt
(
library
.
getProvidentPayMonth
()))
{
this
.
calculateFundType
(
zero
,
library
);
}
}
}
}
...
...
@@ -1529,31 +1535,45 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return
R
.
ok
();
}
private
void
calculateType
(
BigDecimal
zero
,
TForecastLibrary
library
)
{
private
void
calculate
Social
Type
(
BigDecimal
zero
,
TForecastLibrary
library
)
{
if
(
library
.
getDataPush
()
==
CommonConstants
.
ONE_INT
)
{
// 加负数
TForecastLibrary
negateLib
=
new
TForecastLibrary
();
BeanUtil
.
copyProperties
(
library
,
negateLib
);
negateLib
.
setUnitPensionFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getUnitPensionFee
()));
negateLib
.
setUnitMedicalFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getUnitMedicalFee
()));
negateLib
.
setUnitBirthFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getUnitBirthFee
()));
negateLib
.
setUnitWorkInjuryFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getUnitWorkInjuryFee
()));
negateLib
.
setUnitUnemploymentFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getUnitUnemploymentFee
()));
negateLib
.
setUnitBitailmentFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getUnitBitailmentFee
()));
negateLib
.
setUnitInterestFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getUnitInterestFee
()));
negateLib
.
setUnitSocialSum
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getUnitSocialSum
()));
negateLib
.
setUnitPensionFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getUnitPensionFee
()));
negateLib
.
setUnitMedicalFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getUnitMedicalFee
()));
negateLib
.
setUnitBirthFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getUnitBirthFee
()));
negateLib
.
setUnitWorkInjuryFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getUnitWorkInjuryFee
()));
negateLib
.
setUnitUnemploymentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getUnitUnemploymentFee
()));
negateLib
.
setUnitBitailmentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getUnitBitailmentFee
()));
negateLib
.
setUnitInterestFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getUnitInterestFee
()));
negateLib
.
setUnitSocialSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getUnitSocialSum
()));
// 个人社保
negateLib
.
setPersonalPensionFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getPersonalPensionFee
()));
negateLib
.
setPersonalMedicalFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getPersonalMedicalFee
()));
negateLib
.
setPersonalUnemploymentFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getPersonalUnemploymentFee
()));
negateLib
.
setPersonalInterestFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getPersonalUnemploymentFee
()));
negateLib
.
setPersonalBigailmentFee
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getPersonalBigailmentFee
()));
negateLib
.
setPersonalSocialSum
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getPersonalSocialSum
()));
negateLib
.
setPersonalPensionFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getPersonalPensionFee
()));
negateLib
.
setPersonalMedicalFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getPersonalMedicalFee
()));
negateLib
.
setPersonalUnemploymentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getPersonalUnemploymentFee
()));
negateLib
.
setPersonalInterestFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getPersonalInterestFee
()));
negateLib
.
setPersonalBigailmentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getPersonalBigailmentFee
()));
negateLib
.
setPersonalSocialSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getPersonalSocialSum
()));
negateLib
.
setSumAll
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getSumAll
()));
negateLib
.
setDiffType
(
SocialConstants
.
DIFF_TYPE_TWO
);
baseMapper
.
insert
(
negateLib
);
}
else
{
// 删除
baseMapper
.
deleteById
(
library
.
getId
());
}
}
private
void
calculateFundType
(
BigDecimal
zero
,
TForecastLibrary
library
)
{
if
(
library
.
getDataPush
()
==
CommonConstants
.
ONE_INT
)
{
// 加负数
TForecastLibrary
negateLib
=
new
TForecastLibrary
();
BeanUtil
.
copyProperties
(
library
,
negateLib
);
// 单位公积金
negateLib
.
setUnitFundSum
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getUnitFundSum
()));
negateLib
.
setUnitFundSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getUnitFundSum
()));
// 个人公积金
negateLib
.
setPersonalFundSum
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getPersonalFundSum
()));
negateLib
.
setSumAll
(
BigDecimalUtils
.
safeSubtract
(
zero
,
library
.
getSumAll
()));
negateLib
.
setPersonalFundSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getPersonalFundSum
()));
negateLib
.
setSumAll
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getSumAll
()));
negateLib
.
setDiffType
(
SocialConstants
.
DIFF_TYPE_TWO
);
baseMapper
.
insert
(
negateLib
);
}
else
{
...
...
@@ -1721,6 +1741,32 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return
minStartDate
;
}
private
Date
getMinSocialDate
(
TSocialFundInfo
socialFundInfo
)
{
Date
minStartDate
=
null
;
if
(
socialFundInfo
.
getSocialStartDate
()
!=
null
)
{
minStartDate
=
socialFundInfo
.
getSocialStartDate
();
if
(
socialFundInfo
.
getUnitPersionMoney
()
!=
null
&&
socialFundInfo
.
getPensionStart
()
!=
null
&&
socialFundInfo
.
getPensionStart
().
before
(
minStartDate
))
{
minStartDate
=
socialFundInfo
.
getPensionStart
();
}
if
(
socialFundInfo
.
getUnitMedicalMoney
()
!=
null
&&
socialFundInfo
.
getMedicalStart
()
!=
null
&&
socialFundInfo
.
getMedicalStart
().
before
(
minStartDate
))
{
minStartDate
=
socialFundInfo
.
getMedicalStart
();
}
if
(
socialFundInfo
.
getUnitUnemploymentMoney
()
!=
null
&&
socialFundInfo
.
getUnemployStart
()
!=
null
&&
socialFundInfo
.
getUnemployStart
().
before
(
minStartDate
))
{
minStartDate
=
socialFundInfo
.
getUnemployStart
();
}
if
(
socialFundInfo
.
getUnitInjuryMoney
()
!=
null
&&
socialFundInfo
.
getWorkInjuryStart
()
!=
null
&&
socialFundInfo
.
getWorkInjuryStart
().
before
(
minStartDate
))
{
minStartDate
=
socialFundInfo
.
getWorkInjuryStart
();
}
if
(
socialFundInfo
.
getUnitBirthMoney
()
!=
null
&&
socialFundInfo
.
getBirthStart
()
!=
null
&&
socialFundInfo
.
getBirthStart
().
before
(
minStartDate
))
{
minStartDate
=
socialFundInfo
.
getBirthStart
();
}
}
if
(
null
==
minStartDate
)
{
minStartDate
=
new
Date
();
}
return
minStartDate
;
}
/**
* @Description: 核心刷新
* @Author: hgw
...
...
@@ -1738,6 +1784,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
String
createMonth
;
String
sfMapKey
;
TForecastLibrary
tForecastLibrary
;
TForecastLibrary
newForecastLibrary
;
String
diffType
;
Date
minStartDate
;
for
(
String
payMonth
:
payMonthList
)
{
...
...
@@ -1753,7 +1800,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
diffType
=
SocialConstants
.
DIFF_TYPE_ONE
;
if
(
null
!=
tForecastLibrary
)
{
diffType
=
SocialConstants
.
DIFF_TYPE_TWO
;
this
.
getChangeReduceData
(
tSocialInfo
,
tForecastLibrary
);
}
else
if
(
CommonConstants
.
dingleDigitStrArray
[
5
].
equals
(
tSocialInfo
.
getSocialStatus
())
||
CommonConstants
.
dingleDigitStrArray
[
10
].
equals
(
tSocialInfo
.
getSocialStatus
()))
{
// 5 办理失败 10 审核不通过,且无推送数据,不新增
...
...
@@ -1771,7 +1817,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
else
{
historyLibrary
=
socialHistoryMap
.
get
(
sfMapKey
);
// 初始化社保
initSocialLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
tForecastLibrary
,
sfMapKey
,
historyLibrary
);
initSocialLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
sfMapKey
,
historyLibrary
);
if
(
null
!=
tForecastLibrary
)
{
newForecastLibrary
=
saveLibraryMap
.
get
(
sfMapKey
);
if
(
null
!=
newForecastLibrary
)
{
this
.
getChangeReduceData
(
newForecastLibrary
,
tForecastLibrary
);
}
}
}
}
}
...
...
@@ -1785,7 +1837,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
diffType
=
SocialConstants
.
DIFF_TYPE_ONE
;
if
(
null
!=
tForecastLibrary
)
{
diffType
=
SocialConstants
.
DIFF_TYPE_TWO
;
this
.
getChangeReduceData
(
providentFund
,
tForecastLibrary
);
}
else
if
(
CommonConstants
.
dingleDigitStrArray
[
4
].
equals
(
providentFund
.
getFundStatus
())
||
CommonConstants
.
dingleDigitStrArray
[
9
].
equals
(
providentFund
.
getFundStatus
()))
{
// 4办理失败9 审核不通过,且无推送数据,不新增
...
...
@@ -1803,7 +1854,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
else
{
historyLibrary
=
fundHistoryMap
.
get
(
sfMapKey
);
// 初始化公积金
initFundLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
providentFund
,
isReduceSocial
,
tForecastLibrary
,
sfMapKey
,
historyLibrary
);
initFundLibary
(
diffType
,
payMonth
,
saveLibraryMap
,
providentFund
,
isReduceSocial
,
sfMapKey
,
historyLibrary
);
if
(
null
!=
tForecastLibrary
)
{
newForecastLibrary
=
saveLibraryMap
.
get
(
sfMapKey
);
if
(
null
!=
newForecastLibrary
)
{
this
.
getChangeReduceData
(
newForecastLibrary
,
tForecastLibrary
);
}
}
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
a7038b59
...
...
@@ -552,9 +552,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if
(
Common
.
isEmpty
(
tPreDispatchInfo
.
getTelTwo
())){
return
R
.
failed
(
PreDispatchConstants
.
TEL_NOT_EMPTY
);
}
if
(
ValidityUtil
.
checkInvalidEmpPhone
(
tPreDispatchInfo
.
getTelTwo
())){
return
R
.
failed
(
PreDispatchConstants
.
TEL_INVALID
);
}
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tPreDispatchInfo
.
getType
()))
{
initLeaveReason
(
tPreDispatchInfo
);
...
...
@@ -600,8 +597,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
int
i
=
1
;
for
(
TPreDispatchInfo
info
:
listInfo
)
{
i
++;
if
(!
CommonConstants
.
IS_TRUE
.
equals
(
info
.
getTelNotice
())
&&
!
CommonConstants
.
IS_FALSE
.
equals
(
info
.
getTelNotice
()))
{
if
(
Common
.
isNotNull
(
info
.
getTelNotice
())
&&
(
!
CommonConstants
.
IS_TRUE
.
equals
(
info
.
getTelNotice
())
&&
!
CommonConstants
.
IS_FALSE
.
equals
(
info
.
getTelNotice
()))
)
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"是否电话通知不允许导入【是】和【否】之外的内容"
));
continue
;
}
...
...
@@ -749,8 +746,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
String
str
=
null
;
for
(
TPreDispatchInfo
info:
listInfo
){
i
++;
if
(!
CommonConstants
.
IS_TRUE
.
equals
(
info
.
getTelNotice
())
&&
!
CommonConstants
.
IS_FALSE
.
equals
(
info
.
getTelNotice
()))
{
if
(
Common
.
isNotNull
(
info
.
getTelNotice
())
&&
(
!
CommonConstants
.
IS_TRUE
.
equals
(
info
.
getTelNotice
())
&&
!
CommonConstants
.
IS_FALSE
.
equals
(
info
.
getTelNotice
()))
)
{
errorList
.
add
(
new
ErrorMessage
(
i
,
"是否电话通知不允许导入【是】和【否】之外的内容"
));
continue
;
}
...
...
@@ -857,7 +854,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
TPreDispatchInfo
preInfo
=
new
TPreDispatchInfo
();
if
(
Common
.
isNotNull
(
list
)){
for
(
TPreDispatchReduceVo
info:
list
){
BeanUtils
.
copyProperties
(
preInfo
,
i
nfo
);
BeanUtils
.
copyProperties
(
info
,
preI
nfo
);
listInfo
.
add
(
preInfo
);
}
}
...
...
@@ -1174,9 +1171,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if
(
Common
.
isEmpty
(
tPreDispatchInfo
.
getTelTwo
())){
return
PreDispatchConstants
.
TEL_NOT_EMPTY
;
}
if
(
ValidityUtil
.
checkInvalidEmpPhone
(
tPreDispatchInfo
.
getTelTwo
())){
return
PreDispatchConstants
.
TEL_INVALID
;
}
if
(
Common
.
isEmpty
(
tPreDispatchInfo
.
getPensionAddress
())
&&
Common
.
isEmpty
(
tPreDispatchInfo
.
getFundAddress
()))
{
return
PreDispatchConstants
.
NO_SOCIAL_FUND_ADDRESS_ADD
;
...
...
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