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
40725c78
Commit
40725c78
authored
Aug 05, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预估库逻辑变更
parent
c0641660
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+36
-36
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
40725c78
...
...
@@ -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,35 @@ 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
(
false
,
socialFund
.
getUnitPersionMoney
(),
libraryOld
.
getUnitPensionFee
()));
library
Old
.
setUnitMedicalFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
socialFund
.
getUnitMedicalMoney
(),
libraryOld
.
getUnitMedicalFee
()));
library
Old
.
setUnitBirthFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
socialFund
.
getUnitBirthMoney
(),
libraryOld
.
getUnitBirthFee
()));
library
Old
.
setUnitWorkInjuryFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
socialFund
.
getUnitInjuryMoney
(),
libraryOld
.
getUnitWorkInjuryFee
()));
library
Old
.
setUnitUnemploymentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
socialFund
.
getUnitUnemploymentMoney
(),
libraryOld
.
getUnitUnemploymentFee
()));
library
Old
.
setUnitBitailmentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
socialFund
.
getUnitBigailmentMoney
(),
libraryOld
.
getUnitBitailmentFee
()));
library
Old
.
setUnitInterestFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
socialFund
.
getUnitInterestFee
(),
libraryOld
.
getUnitInterestFee
()));
library
Old
.
setUnitSocialSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
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
(
false
,
socialFund
.
getPersonalPersionMoney
(),
libraryOld
.
getPersonalPensionFee
()));
library
Old
.
setPersonalMedicalFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
socialFund
.
getPersonalMedicalMoney
(),
libraryOld
.
getPersonalMedicalFee
()));
library
Old
.
setPersonalUnemploymentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
socialFund
.
getPersonalUnemploymentMoney
(),
libraryOld
.
getPersonalUnemploymentFee
()));
library
Old
.
setPersonalInterestFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
socialFund
.
getPersonalUnemploymentMoney
(),
libraryOld
.
getPersonalUnemploymen
tFee
()));
library
Old
.
setPersonalBigailmentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
socialFund
.
getPersonalBigailmentMoney
(),
libraryOld
.
getPersonalBigailmentFee
()));
library
Old
.
setPersonalSocialSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
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
(
false
,
socialFund
.
getUnitFundSum
(),
libraryOld
.
getUnitFundSum
()));
library
New
.
setUnitFundSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getUnitFundSum
(),
libraryOld
.
getUnitFundSum
()));
// 个人公积金
library
Old
.
setPersonalFundSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
socialFund
.
getPersonalFundSum
(),
libraryOld
.
getPersonalFundSum
()));
library
New
.
setPersonalFundSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
libraryNew
.
getPersonalFundSum
(),
libraryOld
.
getPersonalFundSum
()));
}
...
...
@@ -451,12 +452,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 +1247,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
());
...
...
@@ -1558,7 +1551,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
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
.
getPersonal
Unemploymen
tFee
()));
negateLib
.
setPersonalInterestFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getPersonal
Interes
tFee
()));
negateLib
.
setPersonalBigailmentFee
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getPersonalBigailmentFee
()));
negateLib
.
setPersonalSocialSum
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getPersonalSocialSum
()));
negateLib
.
setSumAll
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getSumAll
()));
...
...
@@ -1790,6 +1783,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
String
createMonth
;
String
sfMapKey
;
TForecastLibrary
tForecastLibrary
;
TForecastLibrary
newForecastLibrary
;
String
diffType
;
Date
minStartDate
;
for
(
String
payMonth
:
payMonthList
)
{
...
...
@@ -1822,9 +1816,12 @@ 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
)
{
this
.
getChangeReduceData
(
tSocialInfo
,
tForecastLibrary
);
newForecastLibrary
=
saveLibraryMap
.
get
(
sfMapKey
);
if
(
null
!=
newForecastLibrary
)
{
this
.
getChangeReduceData
(
newForecastLibrary
,
tForecastLibrary
);
}
}
}
}
...
...
@@ -1856,9 +1853,12 @@ 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
)
{
this
.
getChangeReduceData
(
providentFund
,
tForecastLibrary
);
newForecastLibrary
=
saveLibraryMap
.
get
(
sfMapKey
);
if
(
null
!=
newForecastLibrary
)
{
this
.
getChangeReduceData
(
newForecastLibrary
,
tForecastLibrary
);
}
}
}
...
...
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