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
59739efc
Commit
59739efc
authored
Jul 20, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预估库
parent
57f9fff6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
192 additions
and
163 deletions
+192
-163
TForecastLibrary.java
...fu/cloud/plus/v1/yifu/social/entity/TForecastLibrary.java
+6
-0
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+106
-85
TForecastLibraryMapper.xml
...-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
+80
-78
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TForecastLibrary.java
View file @
59739efc
...
@@ -494,6 +494,12 @@ public class TForecastLibrary extends BaseEntity {
...
@@ -494,6 +494,12 @@ public class TForecastLibrary extends BaseEntity {
@ExcelAttribute
(
name
=
"数据同步:0未同步;1已同步"
)
@ExcelAttribute
(
name
=
"数据同步:0未同步;1已同步"
)
@ExcelProperty
(
"数据同步:0未同步;1已同步"
)
@ExcelProperty
(
"数据同步:0未同步;1已同步"
)
private
Integer
dataPush
;
private
Integer
dataPush
;
/**
* 类型:0社保;1公积金
*/
@ExcelAttribute
(
name
=
"类型:0社保;1公积金"
)
@ExcelProperty
(
"类型:0社保;1公积金"
)
private
Integer
dataType
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
String
>
idList
;
private
List
<
String
>
idList
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
59739efc
...
@@ -191,9 +191,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -191,9 +191,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
@Override
@Override
public
R
<
Boolean
>
createForecastlibary
(
String
payMonths
,
String
empIdCard
,
String
settleDomainIds
)
{
public
R
<
Boolean
>
createForecastlibary
(
String
payMonths
,
String
empIdCard
,
String
settleDomainIds
)
{
//定义未推送的按条件查询得到的预估数据
//定义未推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
libraryList
=
null
;
List
<
TForecastLibrary
>
library
Social
List
=
null
;
//定义已推送的按条件查询得到的预估数据
//定义已推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
libraryListTemp
=
null
;
List
<
TForecastLibrary
>
librarySocialListTemp
=
null
;
//定义未推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
libraryFundList
=
null
;
//定义已推送的按条件查询得到的预估数据
List
<
TForecastLibrary
>
libraryFundListTemp
=
null
;
List
<
String
>
settleDomainIdList
=
Common
.
initStrToList
(
settleDomainIds
,
CommonConstants
.
COMMA_STRING
);
List
<
String
>
settleDomainIdList
=
Common
.
initStrToList
(
settleDomainIds
,
CommonConstants
.
COMMA_STRING
);
List
<
String
>
payMonthList
=
Common
.
initStrToList
(
payMonths
,
CommonConstants
.
COMMA_STRING
);
List
<
String
>
payMonthList
=
Common
.
initStrToList
(
payMonths
,
CommonConstants
.
COMMA_STRING
);
if
(
Common
.
isEmpty
(
payMonths
)
||
payMonthList
==
null
)
{
if
(
Common
.
isEmpty
(
payMonths
)
||
payMonthList
==
null
)
{
...
@@ -211,29 +215,50 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -211,29 +215,50 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
//查询出所有对应条件的预估数、社保数据、公积金数据据用于重新生成
//查询出所有对应条件的预估数、社保数据、公积金数据据用于重新生成
if
(
Common
.
isNotNull
(
empIdCard
))
{
if
(
Common
.
isNotNull
(
empIdCard
))
{
libraryList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
librarySocialList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
librarySocialListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
and
(
obj1
->
obj1
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
or
()
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
))
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
libraryFundList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
libraryListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
library
Fund
ListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
and
(
obj1
->
obj1
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
).
or
().
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
))
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
ne
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
socialInfoList
=
socialFundInfoMapper
.
getSocialList
(
empIdCard
,
null
);
socialInfoList
=
socialFundInfoMapper
.
getSocialList
(
empIdCard
,
null
);
fundList
=
socialFundInfoMapper
.
getFundList
(
empIdCard
,
null
);
fundList
=
socialFundInfoMapper
.
getFundList
(
empIdCard
,
null
);
}
else
{
}
else
{
libraryList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
library
Social
List
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
in
(
TForecastLibrary:
:
getSettleDomainId
,
settleDomainIdList
)
.
in
(
TForecastLibrary:
:
getSettleDomainId
,
settleDomainIdList
)
.
and
(
obj1
->
obj1
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
or
()
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
))
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
libraryListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
librarySocialListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
in
(
TForecastLibrary:
:
getSettleDomainId
,
settleDomainIdList
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ZERO_INT
)
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
libraryFundList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
in
(
TForecastLibrary:
:
getSettleDomainId
,
settleDomainIdList
)
.
in
(
TForecastLibrary:
:
getSettleDomainId
,
settleDomainIdList
)
.
and
(
obj1
->
obj1
.
in
(
TForecastLibrary:
:
getSocialPayMonth
,
payMonthList
).
or
().
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
))
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
ne
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ZERO_INT
));
libraryFundListTemp
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
in
(
TForecastLibrary:
:
getSettleDomainId
,
settleDomainIdList
)
.
eq
(
TForecastLibrary:
:
getDataType
,
CommonConstants
.
ONE_INT
)
.
in
(
TForecastLibrary:
:
getProvidentPayMonth
,
payMonthList
)
.
eq
(
TForecastLibrary:
:
getDataPush
,
CommonConstants
.
ONE_INT
));
socialInfoList
=
socialFundInfoMapper
.
getSocialList
(
null
,
settleDomainIdList
);
socialInfoList
=
socialFundInfoMapper
.
getSocialList
(
null
,
settleDomainIdList
);
fundList
=
socialFundInfoMapper
.
getFundList
(
null
,
settleDomainIdList
);
fundList
=
socialFundInfoMapper
.
getFundList
(
null
,
settleDomainIdList
);
}
}
...
@@ -242,38 +267,42 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -242,38 +267,42 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return
R
.
failed
(
"无需要重新生成的数据(无数据或数据已结算不可重新生成!)"
);
return
R
.
failed
(
"无需要重新生成的数据(无数据或数据已结算不可重新生成!)"
);
}
}
//先删除然后重新生成
//先删除然后重新生成
if
(
Common
.
isNotNull
(
libraryList
))
{
if
(
Common
.
isNotNull
(
librarySocialList
))
{
baseMapper
.
deleteBatchIds
(
libraryList
);
baseMapper
.
deleteBatchIds
(
librarySocialList
);
}
if
(
Common
.
isNotNull
(
libraryFundList
))
{
baseMapper
.
deleteBatchIds
(
libraryFundList
);
}
}
boolean
flag
;
boolean
flag
;
// 已推送的预估明细Map
// 已推送的预估明细Map
HashMap
<
String
,
TForecastLibrary
>
libraryHashMapTemp
=
new
HashMap
<>();
HashMap
<
String
,
TForecastLibrary
>
socialPushMap
=
new
HashMap
<>();
HashMap
<
String
,
TForecastLibrary
>
fundPushMap
=
new
HashMap
<>();
// Map的key
// Map的key
StringBuilder
sfMapKey
;
String
sfMapKey
;
StringBuilder
initKey
;
if
(
Common
.
isNotNull
(
librarySocialListTemp
))
{
if
(
Common
.
isNotNull
(
libraryListTemp
))
{
TForecastLibrary
libraryOld
;
TForecastLibrary
libraryOld
;
for
(
TForecastLibrary
library
:
libraryListTemp
)
{
for
(
TForecastLibrary
library
:
librarySocialListTemp
)
{
sfMapKey
=
new
StringBuilder
(
library
.
getEmpIdcard
());
sfMapKey
=
this
.
getMapKey
(
library
.
getEmpIdcard
(),
library
.
getSettleDomainId
(),
library
.
getSocialPayMonth
(),
library
.
getSocialCreateMonth
());
// 获取key
libraryOld
=
socialPushMap
.
get
(
sfMapKey
);
if
(
Common
.
isNotNull
(
library
.
getSocialProvince
()))
{
if
(
libraryOld
!=
null
)
{
this
.
getMapKey
(
sfMapKey
,
library
.
getSocialProvince
(),
library
.
getSocialCity
(),
library
.
getSocialTown
());
this
.
getChangeAddData
(
libraryOld
,
library
);
}
else
{
this
.
getMapKey
(
sfMapKey
,
library
.
getFundProvince
(),
library
.
getFundCity
(),
library
.
getFundTown
());
}
}
sfMapKey
.
append
(
CommonConstants
.
DOWN_LINE_STRING
).
append
(
library
.
getSocialPayMonth
());
socialPushMap
.
put
(
sfMapKey
,
library
);
sfMapKey
.
append
(
CommonConstants
.
DOWN_LINE_STRING
).
append
(
library
.
getSocialCreateMonth
());
}
libraryOld
=
libraryHashMapTemp
.
get
(
sfMapKey
.
toString
());
}
if
(
Common
.
isNotNull
(
libraryFundListTemp
))
{
TForecastLibrary
libraryOld
;
for
(
TForecastLibrary
library
:
libraryFundListTemp
)
{
sfMapKey
=
this
.
getMapKey
(
library
.
getEmpIdcard
(),
library
.
getSettleDomainId
(),
library
.
getProvidentPayMonth
(),
library
.
getProvidentCreateMonth
());
libraryOld
=
fundPushMap
.
get
(
sfMapKey
);
if
(
libraryOld
!=
null
)
{
if
(
libraryOld
!=
null
)
{
this
.
getChangeAddData
(
libraryOld
,
library
);
this
.
getChangeAddData
(
libraryOld
,
library
);
}
}
libraryHashMapTemp
.
put
(
sfMapKey
.
toString
()
,
library
);
fundPushMap
.
put
(
sfMapKey
,
library
);
}
}
}
}
HashMap
<
String
,
TForecastLibrary
>
libraryHash
Map
=
new
HashMap
<>();
Map
<
String
,
TForecastLibrary
>
saveLibrary
Map
=
new
HashMap
<>();
TForecastLibrary
tForecastLibrary
;
TForecastLibrary
tForecastLibrary
;
// Map的key转String
String
mapKeyStr
;
String
createMonth
;
String
createMonth
;
boolean
isReduceSocial
=
false
;
boolean
isReduceSocial
=
false
;
boolean
isReduceFund
=
false
;
boolean
isReduceFund
=
false
;
...
@@ -282,21 +311,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -282,21 +311,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
Common
.
isNotNull
(
socialInfoList
))
{
if
(
Common
.
isNotNull
(
socialInfoList
))
{
for
(
TSocialFundInfo
tSocialInfo
:
socialInfoList
)
{
for
(
TSocialFundInfo
tSocialInfo
:
socialInfoList
)
{
createMonth
=
ServiceUtil
.
initCreateMonth
(
tSocialInfo
.
getCreateTime
(),
payMonth
);
createMonth
=
ServiceUtil
.
initCreateMonth
(
tSocialInfo
.
getCreateTime
(),
payMonth
);
sfMapKey
=
new
StringBuilder
(
tSocialInfo
.
getEmpIdcard
());
sfMapKey
=
this
.
getMapKey
(
tSocialInfo
.
getEmpIdcard
(),
tSocialInfo
.
getSettleDomain
(),
payMonth
,
createMonth
);
// 获取key
this
.
getMapKey
(
sfMapKey
,
tSocialInfo
.
getSocialProvince
(),
tSocialInfo
.
getSocialCity
(),
tSocialInfo
.
getSocialTown
());
sfMapKey
.
append
(
CommonConstants
.
DOWN_LINE_STRING
).
append
(
payMonth
);
// 不可调换位置
initKey
=
new
StringBuilder
();
initKey
.
append
(
sfMapKey
);
sfMapKey
.
append
(
CommonConstants
.
DOWN_LINE_STRING
).
append
(
createMonth
);
mapKeyStr
=
sfMapKey
.
toString
();
// 变更:已推送的,计算变更值
// 变更:已推送的,计算变更值
tForecastLibrary
=
libraryHashMapTemp
.
get
(
mapKeyStr
);
tForecastLibrary
=
socialPushMap
.
get
(
sfMapKey
);
if
(
null
!=
tForecastLibrary
)
{
if
(
null
!=
tForecastLibrary
)
{
this
.
getChangeReduceData
(
tSocialInfo
,
tForecastLibrary
);
this
.
getChangeReduceData
(
tSocialInfo
,
tForecastLibrary
);
libraryHashMap
.
put
(
sfMapKey
.
toString
(),
tForecastLibrary
);
}
}
//起缴月份在要生成的月份前不处理
//起缴月份在要生成的月份前不处理
if
(
Integer
.
parseInt
(
payMonth
)
<
DateUtil
.
formatDateInt
(
tSocialInfo
.
getSocialStartDate
()))
{
if
(
Integer
.
parseInt
(
payMonth
)
<
DateUtil
.
formatDateInt
(
tSocialInfo
.
getSocialStartDate
()))
{
...
@@ -307,27 +327,18 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -307,27 +327,18 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return
R
.
failed
(
"员工"
+
tSocialInfo
.
getEmpName
()
+
":"
+
tSocialInfo
.
getEmpIdcard
()
+
SocialConstants
.
SOCIAL_SET_ERROR
);
return
R
.
failed
(
"员工"
+
tSocialInfo
.
getEmpName
()
+
":"
+
tSocialInfo
.
getEmpIdcard
()
+
SocialConstants
.
SOCIAL_SET_ERROR
);
}
}
// 初始化社保
// 初始化社保
initSocialLibary
(
payMonth
,
libraryHashMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
init
Key
);
initSocialLibary
(
payMonth
,
saveLibraryMap
,
tSocialInfo
,
isReduceFund
,
agentConfigHashMap
,
tForecastLibrary
,
sfMap
Key
);
}
}
}
}
//封装公积金预估数据
//封装公积金预估数据
if
(
Common
.
isNotNull
(
fundList
))
{
if
(
Common
.
isNotNull
(
fundList
))
{
for
(
TSocialFundInfo
providentFund
:
fundList
)
{
for
(
TSocialFundInfo
providentFund
:
fundList
)
{
createMonth
=
ServiceUtil
.
initCreateMonth
(
providentFund
.
getCreateTime
(),
payMonth
);
createMonth
=
ServiceUtil
.
initCreateMonth
(
providentFund
.
getCreateTime
(),
payMonth
);
sfMapKey
=
new
StringBuilder
(
providentFund
.
getEmpIdcard
());
sfMapKey
=
this
.
getMapKey
(
providentFund
.
getEmpIdcard
(),
providentFund
.
getSettleDomain
(),
payMonth
,
createMonth
);
// 获取key
this
.
getMapKey
(
sfMapKey
,
providentFund
.
getFundProvince
(),
providentFund
.
getFundCity
(),
providentFund
.
getFundTown
());
sfMapKey
.
append
(
CommonConstants
.
DOWN_LINE_STRING
).
append
(
payMonth
);
// 不可调换位置
initKey
=
new
StringBuilder
();
initKey
.
append
(
sfMapKey
);
sfMapKey
.
append
(
CommonConstants
.
DOWN_LINE_STRING
).
append
(
createMonth
);
mapKeyStr
=
sfMapKey
.
toString
();
// 变更:已推送的,计算变更值
// 变更:已推送的,计算变更值
tForecastLibrary
=
libraryHashMapTemp
.
get
(
mapKeyStr
);
tForecastLibrary
=
fundPushMap
.
get
(
sfMapKey
);
if
(
null
!=
tForecastLibrary
)
{
if
(
null
!=
tForecastLibrary
)
{
this
.
getChangeReduceData
(
providentFund
,
tForecastLibrary
);
this
.
getChangeReduceData
(
providentFund
,
tForecastLibrary
);
libraryHashMap
.
put
(
sfMapKey
.
toString
(),
tForecastLibrary
);
}
}
//起缴月份在要生成的月份后不处理
//起缴月份在要生成的月份后不处理
if
(
Integer
.
parseInt
(
payMonth
)
<
DateUtil
.
formatDateInt
(
providentFund
.
getProvidentStart
()))
{
if
(
Integer
.
parseInt
(
payMonth
)
<
DateUtil
.
formatDateInt
(
providentFund
.
getProvidentStart
()))
{
...
@@ -338,12 +349,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -338,12 +349,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return
R
.
failed
(
"员工"
+
providentFund
.
getEmpName
()
+
":"
+
providentFund
.
getEmpIdcard
()
+
SocialConstants
.
SOCIAL_SET_ERROR
);
return
R
.
failed
(
"员工"
+
providentFund
.
getEmpName
()
+
":"
+
providentFund
.
getEmpIdcard
()
+
SocialConstants
.
SOCIAL_SET_ERROR
);
}
}
// 初始化公积金
// 初始化公积金
initFundLibary
(
payMonth
,
libraryHashMap
,
providentFund
,
isReduceSocial
,
init
Key
);
initFundLibary
(
payMonth
,
saveLibraryMap
,
providentFund
,
isReduceSocial
,
tForecastLibrary
,
sfMap
Key
);
}
}
}
}
}
}
boolean
isSaveAndUpdate
=
false
;
boolean
isSaveAndUpdate
=
false
;
for
(
TForecastLibrary
library
:
libraryHash
Map
.
values
())
{
for
(
TForecastLibrary
library
:
saveLibrary
Map
.
values
())
{
if
(
Common
.
isEmpty
(
library
.
getSocialId
())
&&
Common
.
isEmpty
(
library
.
getProvidentId
()))
{
if
(
Common
.
isEmpty
(
library
.
getSocialId
())
&&
Common
.
isEmpty
(
library
.
getProvidentId
()))
{
continue
;
continue
;
}
}
...
@@ -362,6 +373,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -362,6 +373,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
}
private
String
getMapKey
(
String
empIdcard
,
String
settleDomainId
,
String
socialPayMonth
,
String
socialCreateMonth
)
{
StringBuilder
sfMapKey
;
sfMapKey
=
new
StringBuilder
(
empIdcard
);
// 获取key
sfMapKey
.
append
(
CommonConstants
.
DOWN_LINE_STRING
).
append
(
settleDomainId
);
sfMapKey
.
append
(
CommonConstants
.
DOWN_LINE_STRING
).
append
(
socialPayMonth
);
sfMapKey
.
append
(
CommonConstants
.
DOWN_LINE_STRING
).
append
(
socialCreateMonth
);
return
sfMapKey
.
toString
();
}
/**
/**
* @param libraryOld
* @param libraryOld
* @param library
* @param library
...
@@ -460,19 +482,19 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -460,19 +482,19 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
}
private
void
initSocialLibary
(
String
payMonth
,
HashMap
<
String
,
TForecastLibrary
>
libraryHashMap
private
void
initSocialLibary
(
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
tSocialInfo
,
boolean
isReduceFund
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
,
StringBuilder
mapKeyStr
)
{
,
TSocialFundInfo
tSocialInfo
,
boolean
isReduceFund
,
HashMap
<
String
,
TAgentConfig
>
agentConfigMap
mapKeyStr
.
append
(
CommonConstants
.
DOWN_LINE_STRING
).
append
(
ServiceUtil
.
initCreateMonth
(
tSocialInfo
.
getCreateTime
(),
payMonth
));
,
TForecastLibrary
lib
,
String
sfMapKey
)
{
TForecastLibrary
lib
=
libraryHashMap
.
get
(
mapKeyStr
.
toString
());
if
(
null
==
lib
)
{
if
(
null
==
lib
)
{
lib
=
new
TForecastLibrary
();
lib
=
new
TForecastLibrary
();
}
lib
.
setDataType
(
CommonConstants
.
ZERO_INT
);
lib
.
setEmpId
(
tSocialInfo
.
getEmpId
());
lib
.
setEmpId
(
tSocialInfo
.
getEmpId
());
lib
.
setEmpIdcard
(
tSocialInfo
.
getEmpIdcard
());
lib
.
setEmpIdcard
(
tSocialInfo
.
getEmpIdcard
());
lib
.
setEmpName
(
tSocialInfo
.
getEmpName
());
lib
.
setEmpName
(
tSocialInfo
.
getEmpName
());
lib
.
setEmpNo
(
tSocialInfo
.
getEmpNo
());
lib
.
setEmpNo
(
tSocialInfo
.
getEmpNo
());
lib
.
setSocialCreateMonth
(
ServiceUtil
.
initCreateMonth
(
tSocialInfo
.
getCreateTime
(),
payMonth
));
lib
.
setSocialCreateMonth
(
ServiceUtil
.
initCreateMonth
(
tSocialInfo
.
getCreateTime
(),
payMonth
));
lib
.
setProvidentCreateMonth
(
lib
.
getSocialCreateMonth
());
lib
.
setProvidentCreateMonth
(
lib
.
getSocialCreateMonth
());
}
lib
.
setSocialPayMonth
(
payMonth
);
lib
.
setSocialPayMonth
(
payMonth
);
//同时处理公积金日期
//同时处理公积金日期
lib
.
setProvidentPayMonth
(
payMonth
);
lib
.
setProvidentPayMonth
(
payMonth
);
...
@@ -493,7 +515,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -493,7 +515,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
isReduceSocial
=
false
;
isReduceSocial
=
false
;
}
}
lib
=
initForecastLibrary
(
lib
,
tSocialInfo
,
null
,
monthT
,
isReduceFund
,
isReduceSocial
,
agentConfigMap
);
lib
=
initForecastLibrary
(
lib
,
tSocialInfo
,
null
,
monthT
,
isReduceFund
,
isReduceSocial
,
agentConfigMap
);
libraryHashMap
.
put
(
mapKeyStr
.
toString
()
,
lib
);
saveLibraryMap
.
put
(
sfMapKey
,
lib
);
}
}
/**
/**
...
@@ -1112,26 +1134,25 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1112,26 +1134,25 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* 初始化公积金预估信息
* 初始化公积金预估信息
*
*
* @param payMonth
* @param payMonth
* @param
libraryHash
Map
* @param
saveLibrary
Map
* @param providentFund
* @param providentFund
* @param isReduceSocial
* @param isReduceSocial
* @return
* @return
* @Author fxj
* @Author fxj
* @Date 2020-07-21
* @Date 2020-07-21
**/
**/
private
void
initFundLibary
(
String
payMonth
,
HashMap
<
String
,
TForecastLibrary
>
libraryHashMap
private
void
initFundLibary
(
String
payMonth
,
Map
<
String
,
TForecastLibrary
>
saveLibraryMap
,
TSocialFundInfo
providentFund
,
boolean
isReduceSocial
,
StringBuilder
mapKeyStr
)
{
,
TSocialFundInfo
providentFund
,
boolean
isReduceSocial
,
TForecastLibrary
lib
,
String
mapKeyStr
)
{
mapKeyStr
.
append
(
CommonConstants
.
DOWN_LINE_STRING
).
append
(
ServiceUtil
.
initCreateMonth
(
providentFund
.
getCreateTime
(),
payMonth
));
if
(
lib
==
null
)
{
TForecastLibrary
lib
=
libraryHashMap
.
get
(
mapKeyStr
.
toString
());
if
(
null
==
lib
)
{
lib
=
new
TForecastLibrary
();
lib
=
new
TForecastLibrary
();
}
lib
.
setDataType
(
CommonConstants
.
ONE_INT
);
lib
.
setEmpId
(
providentFund
.
getEmpId
());
lib
.
setEmpId
(
providentFund
.
getEmpId
());
lib
.
setEmpIdcard
(
providentFund
.
getEmpIdcard
());
lib
.
setEmpIdcard
(
providentFund
.
getEmpIdcard
());
lib
.
setEmpName
(
providentFund
.
getEmpName
());
lib
.
setEmpName
(
providentFund
.
getEmpName
());
lib
.
setEmpNo
(
providentFund
.
getEmpNo
());
lib
.
setEmpNo
(
providentFund
.
getEmpNo
());
lib
.
setProvidentCreateMonth
(
ServiceUtil
.
initCreateMonth
(
providentFund
.
getCreateTime
(),
payMonth
));
lib
.
setProvidentCreateMonth
(
ServiceUtil
.
initCreateMonth
(
providentFund
.
getCreateTime
(),
payMonth
));
lib
.
setSocialCreateMonth
(
lib
.
getProvidentCreateMonth
());
lib
.
setSocialCreateMonth
(
lib
.
getProvidentCreateMonth
());
}
//同时处理社保日期
//同时处理社保日期
lib
.
setSocialPayMonth
(
payMonth
);
lib
.
setSocialPayMonth
(
payMonth
);
lib
.
setProvidentPayMonth
(
payMonth
);
lib
.
setProvidentPayMonth
(
payMonth
);
...
@@ -1161,7 +1182,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1161,7 +1182,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
isReduceFund
=
false
;
isReduceFund
=
false
;
}
}
lib
=
initForecastLibrary
(
lib
,
null
,
providentFund
,
monthT
,
isReduceFund
,
isReduceSocial
,
null
);
lib
=
initForecastLibrary
(
lib
,
null
,
providentFund
,
monthT
,
isReduceFund
,
isReduceSocial
,
null
);
libraryHashMap
.
put
(
mapKeyStr
.
toString
()
,
lib
);
saveLibraryMap
.
put
(
mapKeyStr
,
lib
);
}
}
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TForecastLibraryMapper.xml
View file @
59739efc
...
@@ -94,6 +94,7 @@
...
@@ -94,6 +94,7 @@
<result
property=
"providentHouseholdName"
column=
"PROVIDENT_HOUSEHOLD_NAME"
/>
<result
property=
"providentHouseholdName"
column=
"PROVIDENT_HOUSEHOLD_NAME"
/>
<result
property=
"providentNo"
column=
"PROVIDENT_NO"
/>
<result
property=
"providentNo"
column=
"PROVIDENT_NO"
/>
<result
property=
"dataPush"
column=
"DATA_PUSH"
/>
<result
property=
"dataPush"
column=
"DATA_PUSH"
/>
<result
property=
"dataType"
column=
"DATA_TYPE"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
...
@@ -101,10 +102,7 @@
...
@@ -101,10 +102,7 @@
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a
a.ID,
.
ID
,
a.EMP_ID,
a.EMP_ID,
a.EMP_NO,
a.EMP_NO,
a.EMP_NAME,
a.EMP_NAME,
...
@@ -174,6 +172,7 @@
...
@@ -174,6 +172,7 @@
a.PROVIDENT_HOUSEHOLD_NAME,
a.PROVIDENT_HOUSEHOLD_NAME,
a.PROVIDENT_NO,
a.PROVIDENT_NO,
a.DATA_PUSH,
a.DATA_PUSH,
a.DATA_TYPE,
a.CREATE_BY,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_NAME,
a.CREATE_TIME,
a.CREATE_TIME,
...
@@ -398,6 +397,9 @@
...
@@ -398,6 +397,9 @@
<if
test=
"tForecastLibrary.dataPush != null"
>
<if
test=
"tForecastLibrary.dataPush != null"
>
AND a.DATA_PUSH = #{tForecastLibrary.dataPush}
AND a.DATA_PUSH = #{tForecastLibrary.dataPush}
</if>
</if>
<if
test=
"tForecastLibrary.dataType != null"
>
AND a.DATA_TYPE = #{tForecastLibrary.dataType}
</if>
<if
test=
"tForecastLibrary.createBy != null and tForecastLibrary.createBy.trim() != ''"
>
<if
test=
"tForecastLibrary.createBy != null and tForecastLibrary.createBy.trim() != ''"
>
AND a.CREATE_BY = #{tForecastLibrary.createBy}
AND a.CREATE_BY = #{tForecastLibrary.createBy}
</if>
</if>
...
...
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