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
007aae38
Commit
007aae38
authored
Jul 27, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调基、导出相关
parent
da7e1aa6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
55 deletions
+73
-55
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+73
-55
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
007aae38
...
...
@@ -1115,64 +1115,24 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
/**
* 初始化公积金预估信息
*
* @param payMonth
* @param saveLibraryMap
* @param providentFund
* @param isReduceSocial
* @return
* @Author fxj
* @Date 2020-07-21
**/
private
void
initFundLibary
(
String
diffType
,
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
providentFund
,
boolean
isReduceSocial
,
TForecastLibrary
lib
,
String
mapKeyStr
,
TForecastLibrary
historyLibrary
)
{
if
(
lib
==
null
)
{
lib
=
new
TForecastLibrary
();
private
void
changeFundInfoByBase
(
TSocialFundInfo
socialFund
,
SysBaseSetInfo
socialSet
)
{
if
(
Common
.
isNotNull
(
socialSet
)
&&
socialFund
.
getUnitFundSum
()
!=
null
)
{
if
(
socialFund
.
getUnitProvidengCardinal
().
compareTo
(
socialSet
.
getLowerLimit
())
<
CommonConstants
.
ZERO_INT
)
{
socialFund
.
setUnitProvidengCardinal
(
socialSet
.
getLowerLimit
());
socialFund
.
setPersonalProvidentCardinal
(
socialSet
.
getLowerLimit
());
}
else
if
(
socialFund
.
getUnitPensionCardinal
().
compareTo
(
socialSet
.
getUpperLimit
())
>
CommonConstants
.
ZERO_INT
)
{
socialFund
.
setUnitProvidengCardinal
(
socialSet
.
getUpperLimit
());
socialFund
.
setPersonalProvidentCardinal
(
socialSet
.
getUpperLimit
());
}
lib
.
setDiffType
(
diffType
);
lib
.
setDataType
(
CommonConstants
.
ONE_INT
);
lib
.
setEmpId
(
providentFund
.
getEmpId
());
lib
.
setEmpIdcard
(
providentFund
.
getEmpIdcard
());
lib
.
setEmpName
(
providentFund
.
getEmpName
());
lib
.
setEmpNo
(
providentFund
.
getEmpNo
());
lib
.
setProvidentCreateMonth
(
ServiceUtil
.
initCreateMonth
(
providentFund
.
getCreateTime
(),
payMonth
));
lib
.
setSocialCreateMonth
(
lib
.
getProvidentCreateMonth
());
//同时处理社保日期
lib
.
setSocialPayMonth
(
payMonth
);
lib
.
setProvidentPayMonth
(
payMonth
);
lib
.
setFundProvince
(
providentFund
.
getFundProvince
());
lib
.
setFundCity
(
providentFund
.
getFundCity
());
lib
.
setFundTown
(
providentFund
.
getFundTown
());
lib
.
setProvidentId
(
providentFund
.
getId
());
lib
.
setUnitId
(
providentFund
.
getUnitIdFund
());
lib
.
setSettleDomainId
(
providentFund
.
getSettleDomainFund
());
//判断是否允许补缴 是否可补缴 0:是
Integer
monthT
=
null
;
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
providentFund
.
getCanOverpay
()))
{
//补缴是否含当月: 含当月
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
providentFund
.
getHaveThisMonth
()))
{
monthT
=
Integer
.
parseInt
(
DateUtil
.
getYearAndMonth
(
LocalDateTimeUtils
.
formatTime
(
providentFund
.
getCreateTime
(),
DateUtil
.
DATETIME_YYYYMM
),
0
));
//补缴是否含当月: 不含含当月
}
else
{
monthT
=
Integer
.
parseInt
(
DateUtil
.
getYearAndMonth
(
LocalDateTimeUtils
.
formatTime
(
providentFund
.
getCreateTime
(),
DateUtil
.
DATETIME_YYYYMM
),
-
CommonConstants
.
ONE_INT
));
//单边小数点处理逻辑
if
(
Common
.
isNotNull
(
socialSet
.
getFundPayPoint
())){
socialFund
.
setUnitFundSum
(
Common
.
formatMoneyForFund
(
BigDecimalUtils
.
safeMultiply
(
socialFund
.
getUnitProvidengCardinal
(),
socialFund
.
getUnitProvidentPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())),
Integer
.
valueOf
(
socialFund
.
getFundPayPoint
())));
socialFund
.
setPersonalFundSum
(
Common
.
formatMoneyForFund
(
BigDecimalUtils
.
safeMultiply
(
socialFund
.
getPersonalProvidentCardinal
(),
socialFund
.
getPersonalProvidentPer
(),
BigDecimal
.
valueOf
(
CommonConstants
.
ONE_OF_PERCENT
.
doubleValue
())),
Integer
.
valueOf
(
socialFund
.
getFundPayPoint
())));
}
}
// 判断公积金对应缴纳月份是否派减了
boolean
isReduceFund
;
if
(
null
!=
providentFund
.
getFundReduceDate
())
{
isReduceFund
=
Integer
.
parseInt
(
payMonth
)
>=
DateUtil
.
formatDateInt
(
providentFund
.
getFundReduceDate
());
}
else
{
isReduceFund
=
false
;
}
lib
=
initForecastLibrary
(
lib
,
null
,
providentFund
,
monthT
,
isReduceFund
,
isReduceSocial
,
null
,
historyLibrary
);
saveLibraryMap
.
put
(
mapKeyStr
,
lib
);
}
private
void
changeSocial
Fund
InfoByBase
(
TSocialFundInfo
social
,
SysBaseSetInfo
socialSet
)
{
private
void
changeSocialInfoByBase
(
TSocialFundInfo
social
,
SysBaseSetInfo
socialSet
)
{
if
(
Common
.
isNotNull
(
socialSet
))
{
social
.
setCanOverpay
(
socialSet
.
getCanOverpay
());
social
.
setSocialHousehold
(
socialSet
.
getId
());
...
...
@@ -1253,6 +1213,63 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
/**
* 初始化公积金预估信息
*
* @param payMonth
* @param saveLibraryMap
* @param providentFund
* @param isReduceSocial
* @return
* @Author fxj
* @Date 2020-07-21
**/
private
void
initFundLibary
(
String
diffType
,
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
providentFund
,
boolean
isReduceSocial
,
TForecastLibrary
lib
,
String
mapKeyStr
,
TForecastLibrary
historyLibrary
)
{
if
(
lib
==
null
)
{
lib
=
new
TForecastLibrary
();
}
lib
.
setDiffType
(
diffType
);
lib
.
setDataType
(
CommonConstants
.
ONE_INT
);
lib
.
setEmpId
(
providentFund
.
getEmpId
());
lib
.
setEmpIdcard
(
providentFund
.
getEmpIdcard
());
lib
.
setEmpName
(
providentFund
.
getEmpName
());
lib
.
setEmpNo
(
providentFund
.
getEmpNo
());
lib
.
setProvidentCreateMonth
(
ServiceUtil
.
initCreateMonth
(
providentFund
.
getCreateTime
(),
payMonth
));
lib
.
setSocialCreateMonth
(
lib
.
getProvidentCreateMonth
());
//同时处理社保日期
lib
.
setSocialPayMonth
(
payMonth
);
lib
.
setProvidentPayMonth
(
payMonth
);
lib
.
setFundProvince
(
providentFund
.
getFundProvince
());
lib
.
setFundCity
(
providentFund
.
getFundCity
());
lib
.
setFundTown
(
providentFund
.
getFundTown
());
lib
.
setProvidentId
(
providentFund
.
getId
());
lib
.
setUnitId
(
providentFund
.
getUnitIdFund
());
lib
.
setSettleDomainId
(
providentFund
.
getSettleDomainFund
());
//判断是否允许补缴 是否可补缴 0:是
Integer
monthT
=
null
;
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
providentFund
.
getCanOverpay
()))
{
//补缴是否含当月: 含当月
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
providentFund
.
getHaveThisMonth
()))
{
monthT
=
Integer
.
parseInt
(
DateUtil
.
getYearAndMonth
(
LocalDateTimeUtils
.
formatTime
(
providentFund
.
getCreateTime
(),
DateUtil
.
DATETIME_YYYYMM
),
0
));
//补缴是否含当月: 不含含当月
}
else
{
monthT
=
Integer
.
parseInt
(
DateUtil
.
getYearAndMonth
(
LocalDateTimeUtils
.
formatTime
(
providentFund
.
getCreateTime
(),
DateUtil
.
DATETIME_YYYYMM
),
-
CommonConstants
.
ONE_INT
));
}
}
// 判断公积金对应缴纳月份是否派减了
boolean
isReduceFund
;
if
(
null
!=
providentFund
.
getFundReduceDate
())
{
isReduceFund
=
Integer
.
parseInt
(
payMonth
)
>=
DateUtil
.
formatDateInt
(
providentFund
.
getFundReduceDate
());
}
else
{
isReduceFund
=
false
;
}
lib
=
initForecastLibrary
(
lib
,
null
,
providentFund
,
monthT
,
isReduceFund
,
isReduceSocial
,
null
,
historyLibrary
);
saveLibraryMap
.
put
(
mapKeyStr
,
lib
);
}
/**
* @param social
* @param limitBase
...
...
@@ -1377,7 +1394,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
socialFundInfoList
=
socialFundInfoMapper
.
selectList
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
.
eq
(
TSocialFundInfo:
:
getSocialHousehold
,
sysBaseSetInfo
.
getDepartId
()));
for
(
TSocialFundInfo
socialFundInfo
:
socialFundInfoList
)
{
this
.
changeSocial
Fund
InfoByBase
(
socialFundInfo
,
sysBaseSetInfo
);
this
.
changeSocialInfoByBase
(
socialFundInfo
,
sysBaseSetInfo
);
socialFundInfoMap
.
put
(
socialFundInfo
.
getId
(),
socialFundInfo
);
}
}
...
...
@@ -1386,6 +1403,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
socialFundInfoList
=
socialFundInfoMapper
.
selectList
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
.
eq
(
TSocialFundInfo:
:
getProvidentHousehold
,
sysBaseSetInfo
.
getDepartId
()));
for
(
TSocialFundInfo
socialFundInfo
:
socialFundInfoList
)
{
this
.
changeFundInfoByBase
(
socialFundInfo
,
sysBaseSetInfo
);
socialFundInfoMap
.
put
(
socialFundInfo
.
getId
(),
socialFundInfo
);
}
}
...
...
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