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
a2691322
Commit
a2691322
authored
Dec 06, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推送优化
parent
8a1616b8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
192 additions
and
50 deletions
+192
-50
TPaymentInfoMapper.java
.../cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
+39
-4
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+102
-42
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+51
-4
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
View file @
a2691322
...
...
@@ -169,31 +169,66 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
* @param searchVo 缴费库
* @return
*/
List
<
TPaymentInfo
>
getTPaymentSocialPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
TPaymentInfo
>
getTPaymentSocialPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库公积金推送查询
* @param searchVo 缴费库
* @return
*/
List
<
TPaymentInfo
>
getTPaymentFundPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
TPaymentInfo
>
getTPaymentFundPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库社保收入推送查询
* @param searchVo 缴费库
* @return
*/
List
<
TPaymentInfo
>
getTPaymentSocialIncomeInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
TPaymentInfo
>
getTPaymentSocialIncomeInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库公积金收入推送查询
* @param searchVo 缴费库
* @return
*/
List
<
TPaymentInfo
>
getTPaymentFundIncomeInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
TPaymentInfo
>
getTPaymentFundIncomeInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
void
updateBySocialPayment
(
@Param
(
"id"
)
String
id
);
void
updateBySocialIncomePayment
(
@Param
(
"id"
)
String
id
);
/**
* 缴费库社保推送查询
* @param searchVo 缴费库
* @return
*/
long
getTPaymentSocialPushCount
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库公积金推送查询
* @param searchVo 缴费库
* @return
*/
long
getTPaymentFundPushCount
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库社保收入推送查询
* @param searchVo 缴费库
* @return
*/
long
getTPaymentSocialIncomeCount
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
* 缴费库公积金收入推送查询
* @param searchVo 缴费库
* @return
*/
long
getTPaymentFundIncomeCount
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
a2691322
...
...
@@ -2537,14 +2537,26 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
public
void
createPaymentFundInfo
()
{
//获取所有未推送的公积金实缴明细数据
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
initEkpPushFundParam
(
unPushInfo
);
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
unPushInfo
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
//获取所有未推送的公积金实缴明细数据
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getFundId
).
last
(
" limit 0,10000"
));
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
initEkpPushFundParam
(
unPushInfo
);
}
}
}
}
}
...
...
@@ -2586,75 +2598,123 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
public
void
createPaymentInfoIncome
()
{
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
if
(
Common
.
isNotNull
(
sumList
))
{
//生成收入
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
sumList
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getSocialId
).
last
(
" limit 0,10000"
));
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成收入
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
}
}
}
}
}
@Override
public
void
createPaymentFundIncome
()
{
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectLis
t
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
long
count
=
baseMapper
.
selectCoun
t
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
if
(
Common
.
isNotNull
(
sumList
))
{
//生成公积金收入
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
sumList
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getFundId
).
last
(
" limit 0,10000"
));
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成公积金收入
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
}
}
}
}
}
public
void
createPaymentSocialInfoReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
//获取所有未推送的社保实缴明细数据
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
getTPaymentSocialPushInfo
(
searchVo
);
if
(
Common
.
isNotNull
(
unPushInfo
))
{
List
<
TPaymentInfo
>
list
=
unPushInfo
.
stream
().
filter
(
e
->
findList
(
e
,
user
)).
collect
(
Collectors
.
toList
());
unPushInfo
.
clear
();
if
(
Common
.
isNotNull
(
list
))
{
//推送数据封装并推送
initEkpPushSocialParam
(
list
);
searchVo
.
setLockStatus
(
CommonConstants
.
ONE_STRING
);
long
count
=
baseMapper
.
getTPaymentSocialPushCount
(
searchVo
,
user
.
getId
());
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
unPushInfo
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
unPushInfo
=
baseMapper
.
getTPaymentSocialPushInfo
(
searchVo
,
user
.
getId
());
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
initEkpPushSocialParam
(
unPushInfo
);
}
}
}
}
}
public
void
createPaymentFundInfoReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
//获取所有未推送的公积金实缴明细数据
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
getTPaymentFundPushInfo
(
searchVo
);
if
(
Common
.
isNotNull
(
unPushInfo
))
{
List
<
TPaymentInfo
>
list
=
unPushInfo
.
stream
().
filter
(
e
->
findList
(
e
,
user
)).
collect
(
Collectors
.
toList
());
unPushInfo
.
clear
();
if
(
Common
.
isNotNull
(
list
))
{
//推送数据封装并推送
initEkpPushFundParam
(
list
);
searchVo
.
setLockStatus
(
CommonConstants
.
ONE_STRING
);
long
count
=
baseMapper
.
getTPaymentFundPushCount
(
searchVo
,
user
.
getId
());
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
unPushInfo
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
unPushInfo
=
baseMapper
.
getTPaymentFundPushInfo
(
searchVo
,
user
.
getId
());
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
initEkpPushFundParam
(
unPushInfo
);
}
}
}
}
}
public
void
createPaymentInfoIncomeReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
getTPaymentSocialIncomeInfo
(
searchVo
);
if
(
Common
.
isNotNull
(
sumList
))
{
List
<
TPaymentInfo
>
list
=
sumList
.
stream
().
filter
(
e
->
findList
(
e
,
user
)).
collect
(
Collectors
.
toList
());
sumList
.
clear
();
if
(
Common
.
isNotNull
(
list
))
{
//生成收入
createIncomeInfo
(
list
,
CommonConstants
.
ONE_STRING
);
searchVo
.
setLockStatus
(
CommonConstants
.
ONE_STRING
);
long
count
=
baseMapper
.
getTPaymentSocialIncomeCount
(
searchVo
,
user
.
getId
());
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
sumList
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
sumList
=
baseMapper
.
getTPaymentSocialIncomeInfo
(
searchVo
,
user
.
getId
());
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成收入
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
}
}
}
}
}
public
void
createPaymentFundIncomeReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
)
{
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
getTPaymentFundIncomeInfo
(
searchVo
);
if
(
Common
.
isNotNull
(
sumList
))
{
List
<
TPaymentInfo
>
list
=
sumList
.
stream
().
filter
(
e
->
findList
(
e
,
user
)).
collect
(
Collectors
.
toList
());
sumList
.
clear
();
if
(
Common
.
isNotNull
(
list
))
{
//生成公积金收入
createIncomeInfo
(
list
,
CommonConstants
.
TWO_STRING
);
searchVo
.
setLockStatus
(
CommonConstants
.
ONE_STRING
);
long
count
=
baseMapper
.
getTPaymentFundIncomeCount
(
searchVo
,
user
.
getId
());
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
sumList
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
sumList
=
baseMapper
.
getTPaymentFundIncomeInfo
(
searchVo
,
user
.
getId
());
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成公积金收入
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
}
}
}
}
}
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
a2691322
...
...
@@ -1242,9 +1242,10 @@
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
<where>
a.PUSH_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
a.PUSH_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
limit 0,10000
</select>
<!--tPaymentInfo公积金推送查询-->
...
...
@@ -1253,9 +1254,10 @@
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
<where>
a.PUSH_STATUS = '1' AND a.FUND_ID IS NOT NULL
a.PUSH_STATUS = '1' AND a.FUND_ID IS NOT NULL
AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
limit 0,10000
</select>
<!--tPaymentInfo社保收入推送查询-->
...
...
@@ -1264,9 +1266,10 @@
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL
AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
limit 0,10000
</select>
<!--tPaymentInfo公积金收入推送查询-->
...
...
@@ -1275,9 +1278,10 @@
<include
refid=
"Base_Column_List"
/>
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL
a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL
AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
limit 0,10000
</select>
<!-- 更改社保公积金推送状态 -->
...
...
@@ -1295,4 +1299,47 @@
where
ID = #{id}
</update>
<select
id=
"getTPaymentSocialPushCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM t_payment_info a
<where>
a.PUSH_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</select>
<!--tPaymentInfo公积金推送查询-->
<select
id=
"getTPaymentFundPushCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM t_payment_info a
<where>
a.PUSH_STATUS = '1' AND a.FUND_ID IS NOT NULL AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</select>
<!--tPaymentInfo社保收入推送查询-->
<select
id=
"getTPaymentSocialIncomeCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.SOCIAL_ID IS NOT NULL AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</select>
<!--tPaymentInfo公积金收入推送查询-->
<select
id=
"getTPaymentFundIncomeCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM t_payment_info a
<where>
a.INCOME_STATUS = '1' AND a.FUND_ID IS NOT NULL AND a.CREATE_BY = #{userId}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</select>
</mapper>
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