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
9b16d009
Commit
9b16d009
authored
Feb 10, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化修改
parent
145e3bf9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
454 additions
and
64 deletions
+454
-64
TPaymentInfoPushVo.java
...yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoPushVo.java
+267
-0
TPaymentInfoMapper.java
.../cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
+18
-16
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+53
-25
DoJointSocialTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
+21
-10
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+95
-13
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoPushVo.java
0 → 100644
View file @
9b16d009
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
/**
* 缴费库合并推送参数
* @author huyc
* @date 2023-2-10 10:01:22
*/
@Data
public
class
TPaymentInfoPushVo
implements
Serializable
{
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 主键拼接
*/
@Schema
(
description
=
"主键拼接"
)
private
String
ids
;
/**
* 员工姓名
*/
@ExcelAttribute
(
name
=
"员工姓名"
)
@Schema
(
description
=
"员工姓名"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"员工姓名"
)
private
String
empName
;
/**
* 身份证号
*/
@ExcelAttribute
(
name
=
"身份证号"
)
@Schema
(
description
=
"身份证号"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 客户名称
*/
@ExcelAttribute
(
name
=
"客户名称"
)
@Schema
(
description
=
"客户名称"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"客户名称"
)
private
String
unitName
;
/**
* 项目名称
*/
@ExcelAttribute
(
name
=
"项目名称"
)
@Schema
(
description
=
"项目名称"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"项目名称"
)
private
String
settleDomainName
;
/**
* 项目编码
*/
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
50
)
@Schema
(
description
=
"项目编码"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"项目编码"
)
private
String
settleDomainCode
;
/**
* 社保户
*/
@ExcelAttribute
(
name
=
"社保户"
)
@Schema
(
description
=
"社保户"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保户"
)
private
String
socialHousehold
;
/**
* 社保缴纳地
*/
@ExcelAttribute
(
name
=
"社保缴纳地"
)
@Schema
(
description
=
"社保缴纳地"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保缴纳地"
)
private
String
socialPayAddr
;
/**
* 社保缴纳月份
*/
@ExcelAttribute
(
name
=
"社保缴纳月份"
)
@Schema
(
description
=
"社保缴纳月份"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保缴纳月份"
)
private
String
socialPayMonth
;
/**
* 社保生成月份
*/
@ExcelAttribute
(
name
=
"社保生成月份"
)
@Schema
(
description
=
"社保生成月份"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保生成月份"
)
private
String
socialCreateMonth
;
/**
* 总合计
*/
@ExcelAttribute
(
name
=
"总合计"
)
@Schema
(
description
=
"总合计"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"总合计"
)
private
BigDecimal
sumAll
;
/**
* 社保合计
*/
@ExcelAttribute
(
name
=
"社保合计"
)
@Schema
(
description
=
"社保合计"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保合计"
)
private
BigDecimal
socialSum
;
/**
* 单位社保合计
*/
@ExcelAttribute
(
name
=
"单位社保合计"
)
@Schema
(
description
=
"单位社保合计"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位社保合计"
)
private
BigDecimal
unitSocialSum
;
/**
* 个人社保合计
*/
@ExcelAttribute
(
name
=
"个人社保合计"
)
@Schema
(
description
=
"个人社保合计"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人社保合计"
)
private
BigDecimal
socialSecurityPersonalSum
;
/**
* 单位社保补缴利息
*/
@ExcelAttribute
(
name
=
"单位社保补缴利息"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位社保补缴利息"
)
private
BigDecimal
companyAccrual
;
/**
* 个人社保补缴利息
*/
@ExcelAttribute
(
name
=
"个人社保补缴利息"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人社保补缴利息"
)
private
BigDecimal
personalAccrual
;
/**
* 单位养老金额
*/
@ExcelAttribute
(
name
=
"单位养老金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位养老金额"
)
private
BigDecimal
unitPensionMoney
;
/**
* 单位医疗金额
*/
@ExcelAttribute
(
name
=
"单位医疗金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位医疗金额"
)
private
BigDecimal
unitMedicalMoney
;
/**
* 单位失业金额
*/
@ExcelAttribute
(
name
=
"单位失业金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位失业金额"
)
private
BigDecimal
unitUnemploymentMoney
;
/**
* 单位工伤金额
*/
@ExcelAttribute
(
name
=
"单位工伤金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位工伤金额"
)
private
BigDecimal
unitInjuryMoney
;
/**
* 单位生育金额
*/
@ExcelAttribute
(
name
=
"单位生育金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位生育金额"
)
private
BigDecimal
unitBirthMoney
;
/**
* 单位大病金额
*/
@ExcelAttribute
(
name
=
"单位大病金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位大病金额"
)
private
BigDecimal
unitBigmailmentMoney
;
/**
* 个人养老金额
*/
@ExcelAttribute
(
name
=
"个人养老金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人养老金额"
)
private
BigDecimal
personalPensionMoney
;
/**
* 个人医疗金额
*/
@ExcelAttribute
(
name
=
"个人医疗金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人医疗金额"
)
private
BigDecimal
personalMedicalMoney
;
/**
* 个人失业金额
*/
@ExcelAttribute
(
name
=
"个人失业金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人失业金额"
)
private
BigDecimal
personalUnemploymentMoney
;
/**
* 个人大病金额
*/
@ExcelAttribute
(
name
=
"个人大病金额"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"个人大病金额"
)
private
BigDecimal
personalBigmailmentMoney
;
/**
* 社保创建人姓名
*/
@ExcelAttribute
(
name
=
"社保创建人姓名"
)
@Schema
(
description
=
"社保创建人姓名"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保创建人姓名"
)
private
String
createName
;
/**
* 创建时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"创建时间"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
View file @
9b16d009
...
@@ -21,6 +21,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -21,6 +21,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
...
@@ -67,6 +69,20 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
...
@@ -67,6 +69,20 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
*/
*/
Integer
selectCountSumPaymentInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
Integer
selectCountSumPaymentInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
/**
* 缴费库简单分页查询
* @param searchVo 缴费库
* @return
*/
List
<
TPaymentInfoPushVo
>
getTPaymentInfoSumPushList
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
/**
* 缴费库合并导出查询
* @param searchVo 缴费库
* @return
*/
Integer
getTPaymentInfoSumPushCount
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
/**
/**
* 缴费库简单分页查询
* 缴费库简单分页查询
* @param searchVo 缴费库
* @param searchVo 缴费库
...
@@ -95,6 +111,8 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
...
@@ -95,6 +111,8 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
**/
**/
TPaymentInfoVo
getAllInfoById
(
String
id
);
TPaymentInfoVo
getAllInfoById
(
String
id
);
List
<
TPaymentInfo
>
getAllPushInfoById
(
@Param
(
"idStr"
)
String
idStr
);
/*
/*
* 已存在社保缴费库数据 非删除状态
* 已存在社保缴费库数据 非删除状态
* @param months
* @param months
...
@@ -168,14 +186,6 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
...
@@ -168,14 +186,6 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
*/
*/
List
<
String
>
getTPaymentInfoList
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
List
<
String
>
getTPaymentInfoList
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
/**
* 缴费库社保推送查询
* @param searchVo 缴费库
* @return
*/
List
<
TPaymentInfo
>
getTPaymentSocialPushInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
/**
* 缴费库公积金推送查询
* 缴费库公积金推送查询
* @param searchVo 缴费库
* @param searchVo 缴费库
...
@@ -206,14 +216,6 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
...
@@ -206,14 +216,6 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
void
updateBySocialIncomeFlag
(
@Param
(
"id"
)
String
id
);
void
updateBySocialIncomeFlag
(
@Param
(
"id"
)
String
id
);
/**
* 缴费库社保推送查询
* @param searchVo 缴费库
* @return
*/
long
getTPaymentSocialPushCount
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
,
@Param
(
"userId"
)
String
userId
);
/**
/**
* 缴费库公积金推送查询
* 缴费库公积金推送查询
* @param searchVo 缴费库
* @param searchVo 缴费库
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
9b16d009
...
@@ -132,6 +132,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -132,6 +132,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Autowired
@Autowired
private
DoJointSocialTask
doJointSocialTask
;
private
DoJointSocialTask
doJointSocialTask
;
@Autowired
private
TPaymentSocialPushMapper
pushMapper
;
/**
/**
* 缴费库简单分页查询
* 缴费库简单分页查询
*
*
...
@@ -2746,19 +2749,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2746,19 +2749,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
@Override
public
void
createPaymentSocialInfo
()
{
public
void
createPaymentSocialInfo
()
{
//获取所有未推送的社保实缴明细数据
//获取所有未推送的社保实缴明细数据
long
count
=
baseMapper
.
selectCount
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
long
count
=
baseMapper
.
getTPaymentInfoSumPushCount
(
null
);
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
if
(
count
>
0
)
{
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
unPushs
;
List
<
TPaymentInfo
PushVo
>
unPushs
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
=
this
.
getSelectVoMap
();
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
=
this
.
getSelectVoMap
();
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
unPushs
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
unPushs
=
baseMapper
.
getTPaymentInfoSumPushList
(
null
);
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getSocialId
).
last
(
" limit 0,10000"
));
synchronized
(
this
)
{
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
unPushs
))
{
if
(
Common
.
isNotNull
(
unPushs
))
{
//推送数据封装并推送
//推送数据封装并推送
...
@@ -2952,13 +2949,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2952,13 +2949,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public
void
createPaymentSocialInfoReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
,
public
void
createPaymentSocialInfoReal
(
YifuUser
user
,
TPaymentInfoSearchVo
searchVo
,
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
)
{
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
)
{
//获取所有未推送的社保实缴明细数据
//获取所有未推送的社保实缴明细数据
searchVo
.
set
LockStatus
(
CommonConstants
.
ONE_STRING
);
searchVo
.
set
CreateBy
(
user
.
getId
()
);
long
count
=
baseMapper
.
getTPayment
SocialPushCount
(
searchVo
,
user
.
getId
()
);
long
count
=
baseMapper
.
getTPayment
InfoSumPushCount
(
searchVo
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
List
<
TPaymentInfo
>
unPushInfo
;
List
<
TPaymentInfo
PushVo
>
unPushInfo
;
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
int
i
=
(
int
)
Math
.
ceil
((
double
)
count
/
CommonConstants
.
TEN_THOUSAND_INT
);
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
for
(
int
j
=
0
;
j
<
i
;
j
++)
{
unPushInfo
=
baseMapper
.
getTPayment
SocialPushInfo
(
searchVo
,
user
.
getId
()
);
unPushInfo
=
baseMapper
.
getTPayment
InfoSumPushList
(
searchVo
);
synchronized
(
this
)
{
synchronized
(
this
)
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
//推送数据封装并推送
...
@@ -3349,25 +3346,50 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3349,25 +3346,50 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
@Override
public
Boolean
updateSocialSettleStatus
(
List
<
EkpSocialViewVo
>
viewVoList
)
{
public
Boolean
updateSocialSettleStatus
(
List
<
EkpSocialViewVo
>
viewVoList
)
{
if
(!
viewVoList
.
isEmpty
())
{
if
(!
viewVoList
.
isEmpty
())
{
TPaymentInfo
paymentInfo
;
TForecastLibrary
library
;
TForecastLibrary
library
;
List
<
TPaymentInfo
>
sUpdateList
=
new
ArrayList
<>();
List
<
TPaymentInfo
>
zSpdateList
=
new
ArrayList
<>();
TPaymentSocialPush
socialPush
;
TPaymentInfo
paymentInfo
;
try
{
try
{
for
(
EkpSocialViewVo
viewVo
:
viewVoList
)
{
for
(
EkpSocialViewVo
viewVo
:
viewVoList
)
{
//判断预估还是实缴
//判断预估还是实缴
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_THR
))
{
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_THR
))
{
socialPush
=
pushMapper
.
selectById
(
viewVo
.
getId
());
//根据明细id更新结算状态
//根据明细id更新结算状态
paymentInfo
=
baseMapper
.
selectById
(
viewVo
.
getId
());
if
(
null
!=
socialPush
)
{
if
(
Common
.
isNotNull
(
paymentInfo
))
{
List
<
TPaymentInfo
>
paymentList
=
baseMapper
.
getAllPushInfoById
(
socialPush
.
getPaymentIds
());
//判断是收入还是支出结算单号
if
(!
paymentList
.
isEmpty
())
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
for
(
TPaymentInfo
tPaymentInfo
:
paymentList
)
{
paymentInfo
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
//判断是收入还是支出结算单号
paymentInfo
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
}
else
{
tPaymentInfo
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
paymentInfo
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
tPaymentInfo
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
paymentInfo
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
sUpdateList
.
add
(
tPaymentInfo
);
}
else
{
tPaymentInfo
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
tPaymentInfo
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
zSpdateList
.
add
(
tPaymentInfo
);
}
log
.
info
(
"缴费库实缴费用状态更新"
);
}
}
}
else
{
//根据明细id更新结算状态
paymentInfo
=
baseMapper
.
selectById
(
viewVo
.
getId
());
if
(
Common
.
isNotNull
(
paymentInfo
))
{
//判断是收入还是支出结算单号
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
viewVo
.
getPayFlag
()))
{
paymentInfo
.
setIncomeSettleFlag
(
viewVo
.
getIncomeSettleFlag
());
paymentInfo
.
setIncomeCollectFlag
(
viewVo
.
getIncomeCollectFlag
());
}
else
{
paymentInfo
.
setPaySettleFlag
(
viewVo
.
getPaySettleFlag
());
paymentInfo
.
setPayCollectFlag
(
viewVo
.
getPayCollectFlag
());
}
baseMapper
.
updateStatusById
(
paymentInfo
);
log
.
info
(
"缴费库实缴费用状态更新"
);
}
}
baseMapper
.
updateStatusById
(
paymentInfo
);
log
.
info
(
"缴费库实缴费用状态更新"
);
}
}
}
else
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_ONE
))
{
}
else
if
(
viewVo
.
getSettleFlag
().
contains
(
SocialConstants
.
DIFF_TYPE_ONE
))
{
//根据明细id更新结算状态
//根据明细id更新结算状态
...
@@ -3385,6 +3407,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3385,6 +3407,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
}
}
}
if
(!
sUpdateList
.
isEmpty
())
{
this
.
updateBatchById
(
sUpdateList
);
}
if
(!
zSpdateList
.
isEmpty
())
{
this
.
updateBatchById
(
zSpdateList
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"更新社保结算状态失败"
,
e
);
log
.
error
(
"更新社保结算状态失败"
,
e
);
return
false
;
return
false
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
View file @
9b16d009
...
@@ -14,23 +14,19 @@ import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
...
@@ -14,23 +14,19 @@ import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam
;
import
com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.constants.SocialConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TForecastLibraryMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TForecastLibraryMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentSocialPushMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoPushVo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 主要执行人员档案的员工类型同步更新
* 主要执行人员档案的员工类型同步更新
...
@@ -63,6 +59,9 @@ public class DoJointSocialTask {
...
@@ -63,6 +59,9 @@ public class DoJointSocialTask {
@Autowired
@Autowired
private
TForecastLibraryMapper
forecastLibraryMapper
;
private
TForecastLibraryMapper
forecastLibraryMapper
;
@Autowired
private
TPaymentSocialPushMapper
socialPushMapper
;
@Autowired
@Autowired
private
RedisUtil
redisUtil
;
private
RedisUtil
redisUtil
;
...
@@ -428,12 +427,14 @@ public class DoJointSocialTask {
...
@@ -428,12 +427,14 @@ public class DoJointSocialTask {
* @return: void
* @return: void
**/
**/
@Async
@Async
public
void
asynchronousEkpPaymentSocial
(
List
<
TPaymentInfo
>
unPushInfo
,
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
)
{
public
void
asynchronousEkpPaymentSocial
(
List
<
TPaymentInfo
PushVo
>
unPushInfo
,
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
)
{
log
.
info
(
"推送社保实缴费用到EKP-线程开始"
);
log
.
info
(
"推送社保实缴费用到EKP-线程开始"
);
TSettleDomain
settleDomain
;
TSettleDomain
settleDomain
;
EkpPushSocialParam
socialParam
;
EkpPushSocialParam
socialParam
;
TPaymentSocialPush
a
;
List
<
EkpPushSocialParam
>
paramList
=
new
ArrayList
<>();
List
<
EkpPushSocialParam
>
paramList
=
new
ArrayList
<>();
for
(
TPaymentInfo
library
:
unPushInfo
)
{
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
for
(
TPaymentInfoPushVo
library
:
unPushInfo
)
{
try
{
try
{
//获取项目信息
//获取项目信息
if
(
Common
.
isNotNull
(
mapSelectVo
))
{
if
(
Common
.
isNotNull
(
mapSelectVo
))
{
...
@@ -668,9 +669,14 @@ public class DoJointSocialTask {
...
@@ -668,9 +669,14 @@ public class DoJointSocialTask {
String
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
String
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
if
(
Common
.
isEmpty
(
body
)
||
body
.
length
()
!=
32
)
{
if
(
Common
.
isEmpty
(
body
)
||
body
.
length
()
!=
32
)
{
paramList
.
add
(
socialParam
);
paramList
.
add
(
socialParam
);
idMap
.
put
(
library
.
getId
(),
library
.
getIds
());
}
}
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
paymentInfoMapper
.
updateBySocialPayment
(
library
.
getId
());
paymentInfoMapper
.
updateBySocialPayment
(
library
.
getId
());
a
=
new
TPaymentSocialPush
();
a
.
setId
(
library
.
getId
());
a
.
setPaymentIds
(
library
.
getIds
());
socialPushMapper
.
insert
(
a
);
}
else
{
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateTime
(
new
Date
());
...
@@ -702,6 +708,10 @@ public class DoJointSocialTask {
...
@@ -702,6 +708,10 @@ public class DoJointSocialTask {
String
body
=
ekpSocialUtil
.
sendToEKP
(
s
);
String
body
=
ekpSocialUtil
.
sendToEKP
(
s
);
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
paymentInfoMapper
.
updateBySocialPayment
(
s
.
getFd_3b0afbe1f94a08
());
paymentInfoMapper
.
updateBySocialPayment
(
s
.
getFd_3b0afbe1f94a08
());
a
=
new
TPaymentSocialPush
();
a
.
setId
(
s
.
getFd_3b0afbe1f94a08
());
a
.
setPaymentIds
(
idMap
.
get
(
s
.
getFd_3b0afbe1f94a08
()));
socialPushMapper
.
insert
(
a
);
}
else
{
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateTime
(
new
Date
());
...
@@ -727,6 +737,7 @@ public class DoJointSocialTask {
...
@@ -727,6 +737,7 @@ public class DoJointSocialTask {
}
}
}
}
}
}
idMap
.
clear
();
log
.
info
(
"推送社保实缴费用到EKP结束"
);
log
.
info
(
"推送社保实缴费用到EKP结束"
);
}
}
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
9b16d009
...
@@ -158,6 +158,36 @@
...
@@ -158,6 +158,36 @@
<result
property=
"keyGroup"
column=
"keyGroup"
/>
<result
property=
"keyGroup"
column=
"keyGroup"
/>
</resultMap>
</resultMap>
<resultMap
id=
"tPaymentInfoSumPushMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoPushVo"
>
<result
property=
"ids"
column=
"ids"
/>
<result
property=
"id"
column=
"ID"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"unitName"
column=
"UNIT_NAME"
/>
<result
property=
"settleDomainName"
column=
"SETTLE_DOMAIN_NAME"
/>
<result
property=
"settleDomainCode"
column=
"SETTLE_DOMAIN_CODE"
/>
<result
property=
"socialHousehold"
column=
"SOCIAL_HOUSEHOLD"
/>
<result
property=
"socialPayAddr"
column=
"SOCIAL_PAY_ADDR"
/>
<result
property=
"socialPayMonth"
column=
"SOCIAL_PAY_MONTH"
/>
<result
property=
"socialCreateMonth"
column=
"SOCIAL_CREATE_MONTH"
/>
<result
property=
"sumAll"
column=
"SUM_ALL"
/>
<result
property=
"socialSum"
column=
"SOCIAL_SUM"
/>
<result
property=
"unitSocialSum"
column=
"UNIT_SOCIAL_SUM"
/>
<result
property=
"socialSecurityPersonalSum"
column=
"SOCIAL_SECURITY_PERSONAL_SUM"
/>
<result
property=
"companyAccrual"
column=
"COMPANY_ACCRUAL"
/>
<result
property=
"personalAccrual"
column=
"PERSONAL_ACCRUAL"
/>
<result
property=
"unitPensionMoney"
column=
"UNIT_PENSION_MONEY"
/>
<result
property=
"unitMedicalMoney"
column=
"UNIT_MEDICAL_MONEY"
/>
<result
property=
"unitUnemploymentMoney"
column=
"UNIT_UNEMPLOYMENT_MONEY"
/>
<result
property=
"unitInjuryMoney"
column=
"UNIT_INJURY_MONEY"
/>
<result
property=
"unitBirthMoney"
column=
"UNIT_BIRTH_MONEY"
/>
<result
property=
"unitBigmailmentMoney"
column=
"UNIT_BIGMAILMENT_MONEY"
/>
<result
property=
"personalPensionMoney"
column=
"PERSONAL_PENSION_MONEY"
/>
<result
property=
"personalMedicalMoney"
column=
"PERSONAL_MEDICAL_MONEY"
/>
<result
property=
"personalUnemploymentMoney"
column=
"PERSONAL_UNEMPLOYMENT_MONEY"
/>
<result
property=
"personalBigmailmentMoney"
column=
"PERSONAL_BIGMAILMENT_MONEY"
/>
</resultMap>
<resultMap
id=
"tPaymentInfoBatchMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoBatchVo"
>
<resultMap
id=
"tPaymentInfoBatchMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoBatchVo"
>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empNo"
column=
"EMP_NO"
/>
<result
property=
"empNo"
column=
"EMP_NO"
/>
...
@@ -612,6 +642,9 @@
...
@@ -612,6 +642,9 @@
<if
test=
"tPaymentInfo.lockStatus != null and tPaymentInfo.lockStatus.trim() != ''"
>
<if
test=
"tPaymentInfo.lockStatus != null and tPaymentInfo.lockStatus.trim() != ''"
>
AND a.LOCK_STATUS = #{tPaymentInfo.lockStatus}
AND a.LOCK_STATUS = #{tPaymentInfo.lockStatus}
</if>
</if>
<if
test=
"tPaymentInfo.createBy != null and tPaymentInfo.createBy.trim() != ''"
>
AND a.CREATE_BY = #{tPaymentInfo.createBy}
</if>
</if>
</if>
</if>
</if>
</sql>
</sql>
...
@@ -796,7 +829,7 @@
...
@@ -796,7 +829,7 @@
a.ID
a.ID
FROM t_payment_info a
FROM t_payment_info a
<where>
<where>
a.LOCK_STATUS = '0'
AND a.CREATE_BY = #{tPaymentInfo.createBy}
a.LOCK_STATUS = '0'
<include
refid=
"tPaymentInfo_export_where"
/>
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</where>
</select>
</select>
...
@@ -1015,6 +1048,59 @@
...
@@ -1015,6 +1048,59 @@
GROUP BY w.keyGroup) c
GROUP BY w.keyGroup) c
</select>
</select>
<!--tPaymentInfo合并查询-->
<select
id=
"getTPaymentInfoSumPushList"
resultMap=
"tPaymentInfoSumPushMap"
>
SELECT
a.ID,
GROUP_CONCAT("'",a.ID,"'") as ids,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
a.SETTLE_DOMAIN_CODE,
a.SETTLE_DOMAIN_NAME,
a.SOCIAL_HOUSEHOLD,
a.SOCIAL_PAY_ADDR,
a.SOCIAL_PAY_MONTH,
a.SOCIAL_CREATE_MONTH,
SUM( a.SUM_ALL ) AS SUM_ALL,
SUM( a.SOCIAL_SUM ) AS SOCIAL_SUM,
SUM( a.UNIT_SOCIAL_SUM ) AS UNIT_SOCIAL_SUM,
SUM( a.SOCIAL_SECURITY_PERSONAL_SUM ) AS SOCIAL_SECURITY_PERSONAL_SUM,
SUM( a.COMPANY_ACCRUAL ) AS COMPANY_ACCRUAL,
SUM( a.PERSONAL_ACCRUAL ) AS PERSONAL_ACCRUAL,
SUM( a.UNIT_PENSION_MONEY ) AS UNIT_PENSION_MONEY,
SUM( a.UNIT_MEDICAL_MONEY ) AS UNIT_MEDICAL_MONEY,
SUM( a.UNIT_UNEMPLOYMENT_MONEY ) AS UNIT_UNEMPLOYMENT_MONEY,
SUM( a.UNIT_INJURY_MONEY ) AS UNIT_INJURY_MONEY,
SUM( a.UNIT_BIRTH_MONEY ) AS UNIT_BIRTH_MONEY,
SUM( a.UNIT_BIGMAILMENT_MONEY ) AS UNIT_BIGMAILMENT_MONEY,
SUM( a.PERSONAL_PENSION_MONEY ) AS PERSONAL_PENSION_MONEY,
SUM( a.PERSONAL_MEDICAL_MONEY ) AS PERSONAL_MEDICAL_MONEY,
SUM( a.PERSONAL_UNEMPLOYMENT_MONEY ) AS PERSONAL_UNEMPLOYMENT_MONEY,
SUM( a.PERSONAL_BIGMAILMENT_MONEY ) AS PERSONAL_BIGMAILMENT_MONEY,
a.CREATE_NAME,
a.CREATE_TIME
FROM t_payment_info a
<where>
IFNULL(a.SOCIAL_ID,'1') != '1' and a.PUSH_STATUS = '1' and a.LOCK_STAUTS = '1'
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
limit 0,10000
</select>
<!--tPaymentInfo合并查询-->
<select
id=
"getTPaymentInfoSumPushCount"
resultType=
"java.lang.Integer"
>
SELECT
count (1)
FROM t_payment_info a
<where>
IFNULL(a.SOCIAL_ID,'1') != '1' and a.PUSH_STATUS = '1' and a.LOCK_STAUTS = '1'
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
</select>
<update
id=
"updateDeleteInfo"
>
<update
id=
"updateDeleteInfo"
>
update t_payment_info
update t_payment_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
...
@@ -1091,6 +1177,14 @@
...
@@ -1091,6 +1177,14 @@
where a.ID = #{id}
where a.ID = #{id}
</select>
</select>
<!--tPaymentInfo 按ID查收缴费库包含社保和公积金明细的数据查询-->
<select
id=
"getAllPushInfoById"
resultMap=
"tPaymentInfoMap"
>
SELECT
*
FROM t_payment_info a
where a.ID in (${idStr})
</select>
<select
id=
"selectListForPaymentImport"
resultMap=
"tPaymentInfoMap"
>
<select
id=
"selectListForPaymentImport"
resultMap=
"tPaymentInfoMap"
>
SELECT
SELECT
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
...
@@ -1265,18 +1359,6 @@
...
@@ -1265,18 +1359,6 @@
</foreach>
</foreach>
</update>
</update>
<!--tPaymentInfo社保推送查询-->
<select
id=
"getTPaymentSocialPushInfo"
resultMap=
"tPaymentInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
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>
limit 0,10000
</select>
<!--tPaymentInfo公积金推送查询-->
<!--tPaymentInfo公积金推送查询-->
<select
id=
"getTPaymentFundPushInfo"
resultMap=
"tPaymentInfoMap"
>
<select
id=
"getTPaymentFundPushInfo"
resultMap=
"tPaymentInfoMap"
>
SELECT
SELECT
...
...
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