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
eb21df7e
Commit
eb21df7e
authored
Nov 21, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
b5c91a06
cd651d14
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
592 additions
and
868 deletions
+592
-868
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+1
-1
TPaymentInfoExportVo.java
...fu/cloud/plus/v1/yifu/social/vo/TPaymentInfoExportVo.java
+0
-54
TPaymentInfoSearchVo.java
...fu/cloud/plus/v1/yifu/social/vo/TPaymentInfoSearchVo.java
+13
-3
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+17
-2
TPaymentInfoMapper.java
.../cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
+7
-8
TIncomeService.java
...ifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
+2
-1
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+8
-1
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+2
-3
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+17
-117
TIncomeServiceImpl.java
.../plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
+75
-391
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+117
-174
DoJointSocialTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
+240
-0
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+93
-113
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
eb21df7e
...
@@ -6166,7 +6166,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -6166,7 +6166,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
//判断是否存在当月的商险收入数据
//判断是否存在当月的商险收入数据
B
oolean
isExist
=
false
;
b
oolean
isExist
=
false
;
List
<
TIncomeDetail
>
incomeDetailList
=
new
ArrayList
<>();
List
<
TIncomeDetail
>
incomeDetailList
=
new
ArrayList
<>();
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setEmpIdcard
(
insuranceDetail
.
getEmpIdcardNo
());
incomeDetail
.
setEmpIdcard
(
insuranceDetail
.
getEmpIdcardNo
());
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoExportVo.java
View file @
eb21df7e
...
@@ -188,60 +188,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
...
@@ -188,60 +188,6 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
@ExcelProperty
(
"公积金缴纳地"
)
@ExcelProperty
(
"公积金缴纳地"
)
private
String
providentPayAddr
;
private
String
providentPayAddr
;
/**
* 公积金缴纳地-省
*/
@ExcelAttribute
(
name
=
"公积金缴纳地-省"
,
isArea
=
true
)
@Schema
(
description
=
"公积金缴纳地-省"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"公积金缴纳地-省"
)
private
String
fundProvince
;
/**
* 公积金缴纳地-市
*/
@ExcelAttribute
(
name
=
"公积金缴纳地-市"
,
isArea
=
true
,
parentField
=
"fundProvince"
)
@Schema
(
description
=
"公积金缴纳地-市"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"公积金缴纳地-市"
)
private
String
fundCity
;
/**
* 公积金缴纳地-县
*/
@ExcelAttribute
(
name
=
"公积金缴纳地-县"
,
isArea
=
true
,
parentField
=
"fundCity"
)
@Schema
(
description
=
"公积金缴纳地-县"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"公积金缴纳地-县"
)
private
String
fundTown
;
/**
* 社保缴纳地-省
*/
@ExcelAttribute
(
name
=
"社保缴纳地-省"
,
isArea
=
true
)
@Schema
(
description
=
"社保缴纳地-省"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保缴纳地-省"
)
private
String
socialProvince
;
/**
* 社保缴纳地-市
*/
@ExcelAttribute
(
name
=
"社保缴纳地-市"
,
isArea
=
true
,
parentField
=
"socialProvince"
)
@Schema
(
description
=
"社保缴纳地-市"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保缴纳地-市"
)
private
String
socialCity
;
/**
* 社保缴纳地-县
*/
@ExcelAttribute
(
name
=
"社保缴纳地-县"
,
isArea
=
true
,
parentField
=
"socialCity"
)
@Schema
(
description
=
"社保缴纳地-县"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保缴纳地-县"
)
private
String
socialTown
;
/**
/**
* 社保合计
* 社保合计
*/
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoSearchVo.java
View file @
eb21df7e
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
*/
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -43,10 +45,18 @@ public class TPaymentInfoSearchVo extends TPaymentInfo {
...
@@ -43,10 +45,18 @@ public class TPaymentInfoSearchVo extends TPaymentInfo {
private
List
<
String
>
idList
;
private
List
<
String
>
idList
;
/**
/**
*
创建时间区间 [开始时间,结束时间]
*
开始时间(查询专用)
*/
*/
@Schema
(
description
=
"创建时间区间"
)
@ExcelAttribute
(
name
=
"创建开始时间"
)
private
LocalDateTime
[]
createTimes
;
@TableField
(
exist
=
false
)
private
LocalDateTime
createTimeStart
;
/**
* 截止时间(查询专用)
*/
@ExcelAttribute
(
name
=
"创建截止时间"
)
@TableField
(
exist
=
false
)
private
LocalDateTime
createTimeEnd
;
/**
/**
* @Author fxj
* @Author fxj
* 查询数据起
* 查询数据起
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
eb21df7e
...
@@ -402,8 +402,10 @@ public class TPaymentInfoController {
...
@@ -402,8 +402,10 @@ public class TPaymentInfoController {
@Operation
(
summary
=
"手动推送社保缴费库明细的数据"
,
description
=
"手动推送社保缴费库明细的数据"
)
@Operation
(
summary
=
"手动推送社保缴费库明细的数据"
,
description
=
"手动推送社保缴费库明细的数据"
)
@SysLog
(
"手动推送社保缴费库明细的数据"
)
@SysLog
(
"手动推送社保缴费库明细的数据"
)
@PostMapping
(
"/pushPaymentSocialFundInfo"
)
@PostMapping
(
"/pushPaymentSocialFundInfo"
)
public
R
<
Boolean
>
pushPaymentSocialFundInfo
()
{
public
R
<
Boolean
>
pushPaymentSocialFundInfo
(
@RequestParam
(
name
=
"socialHouse"
,
required
=
false
)
String
socialHouse
,
tPaymentInfoService
.
pushPaymentSocialFundInfo
();
@RequestParam
(
name
=
"fundHouse"
,
required
=
false
)
String
fundHouse
,
@RequestParam
(
name
=
"settleDomainId"
,
required
=
false
)
String
settleDomainId
)
{
tPaymentInfoService
.
pushPaymentSocialFundInfo
(
socialHouse
,
fundHouse
,
settleDomainId
);
return
R
.
ok
();
return
R
.
ok
();
}
}
...
@@ -418,4 +420,17 @@ public class TPaymentInfoController {
...
@@ -418,4 +420,17 @@ public class TPaymentInfoController {
public
R
<
String
>
changeDeptByEkp
(
@RequestBody
ChangeDeptVo
changeDeptVo
)
{
public
R
<
String
>
changeDeptByEkp
(
@RequestBody
ChangeDeptVo
changeDeptVo
)
{
return
tPaymentInfoService
.
changeDeptByEkp
(
changeDeptVo
);
return
tPaymentInfoService
.
changeDeptByEkp
(
changeDeptVo
);
}
}
/**
* @Description: 批量标识可以推送的数据
* @Author: huyc
* @Date: 2022/11/16
* @return: R
**/
@Operation
(
summary
=
"批量标识可以推送的数据"
,
description
=
"批量标识可以推送的数据"
)
@SysLog
(
"批量标识可以推送的数据"
)
@PostMapping
(
"/batchUpdatePaymentInfo"
)
public
R
<
Boolean
>
batchUpdatePaymentInfo
(
@RequestBody
TPaymentInfoSearchVo
searchVo
)
{
return
tPaymentInfoService
.
batchUpdatePaymentInfo
(
searchVo
);
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
View file @
eb21df7e
...
@@ -24,7 +24,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
...
@@ -24,7 +24,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
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
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.ChangeDeptDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo
;
...
@@ -91,13 +90,6 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
...
@@ -91,13 +90,6 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
**/
**/
TPaymentInfoVo
getAllInfoById
(
String
id
);
TPaymentInfoVo
getAllInfoById
(
String
id
);
/**
* 查询要删除的数据
* @param queryEntity
* @return
**/
List
<
TPaymentInfo
>
selectListForDelete
(
@Param
(
"queryEntity"
)
TPaymentInfo
queryEntity
);
/*
/*
* 已存在社保缴费库数据 非删除状态
* 已存在社保缴费库数据 非删除状态
* @param months
* @param months
...
@@ -164,4 +156,11 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
...
@@ -164,4 +156,11 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
**/
**/
int
changePaymentDept
(
@Param
(
"idSet"
)
Set
<
String
>
idSet
,
@Param
(
"dept"
)
TSettleDomainSelectVo
dept
);
int
changePaymentDept
(
@Param
(
"idSet"
)
Set
<
String
>
idSet
,
@Param
(
"dept"
)
TSettleDomainSelectVo
dept
);
/**
* 缴费库未打标数据查询
* @param searchVo 缴费库
* @return
*/
List
<
String
>
getTPaymentInfoList
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TIncomeService.java
View file @
eb21df7e
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -65,7 +66,7 @@ public interface TIncomeService extends IService<TIncome> {
...
@@ -65,7 +66,7 @@ public interface TIncomeService extends IService<TIncome> {
* @Date: 2022/9/9 11:42
* @Date: 2022/9/9 11:42
* @return:
* @return:
**/
**/
void
saveBathDetail
(
List
<
TIncomeDetail
>
tIncomeDetail
);
boolean
saveBathDetail
(
TIncomeDetail
tIncomeDetail
,
TPaymentInfo
paymentInfo
);
void
pushDetail
();
void
pushDetail
();
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
eb21df7e
...
@@ -148,7 +148,14 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
...
@@ -148,7 +148,14 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
TPaymentVo
getPaymentSocialAndFound
(
TPaymentInfo
info
);
TPaymentVo
getPaymentSocialAndFound
(
TPaymentInfo
info
);
void
pushPaymentSocialFundInfo
();
void
pushPaymentSocialFundInfo
(
String
socialHouse
,
String
fundHouse
,
String
settleDomainId
);
/**
* 批量标识可以推送的数据
* @Author huyc
* @Date 2022-11-16 10:06:13
**/
R
<
Boolean
>
batchUpdatePaymentInfo
(
TPaymentInfoSearchVo
searchVo
);
/**
/**
* @param changeDeptVo
* @param changeDeptVo
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
eb21df7e
...
@@ -4231,7 +4231,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -4231,7 +4231,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
//判断是否存在当月的公积金收入数据
//判断是否存在当月的公积金收入数据
B
oolean
isExist
=
false
;
b
oolean
isExist
=
false
;
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
TIncomeDetail
incomeDetail
=
new
TIncomeDetail
();
incomeDetail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
incomeDetail
.
setEmpIdcard
(
library
.
getEmpIdcard
());
incomeDetail
.
setPayMonth
(
library
.
getProvidentPayMonth
());
incomeDetail
.
setPayMonth
(
library
.
getProvidentPayMonth
());
...
@@ -4243,12 +4243,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
...
@@ -4243,12 +4243,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
for
(
TIncomeDetail
income
:
detailList
)
{
for
(
TIncomeDetail
income
:
detailList
)
{
sumMoney
=
BigDecimalUtils
.
safeAdd
(
income
.
getMoney
(),
sumMoney
);
sumMoney
=
BigDecimalUtils
.
safeAdd
(
income
.
getMoney
(),
sumMoney
);
}
}
if
(
sumMoney
.
compareTo
(
BigDecimal
.
ZERO
)
==
CommonConstants
.
ONE_INT
)
{
if
(
sumMoney
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
isExist
=
true
;
isExist
=
true
;
}
}
}
}
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有社保,则计算收入
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
()
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
settleDomain
.
getManageServerItem
()
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
eb21df7e
...
@@ -51,11 +51,13 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
...
@@ -51,11 +51,13 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
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.util.DoJointSocialTask
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryExportVo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
...
@@ -95,6 +97,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -95,6 +97,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
private
final
TSendEkpErrorService
tSendEkpErrorService
;
private
final
TSendEkpErrorService
tSendEkpErrorService
;
@Autowired
private
DoJointSocialTask
doJointSocialTask
;
/**
/**
* 预估费用简单分页查询
* 预估费用简单分页查询
*
*
...
@@ -2371,9 +2376,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2371,9 +2376,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
public
void
initEkpPushSocialParam
(
List
<
TForecastLibrary
>
unPushInfo
)
{
public
void
initEkpPushSocialParam
(
List
<
TForecastLibrary
>
unPushInfo
)
{
List
<
String
>
pushList
=
new
ArrayList
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
R
<
TSettleDomainListVo
>
listVo
;
R
<
TSettleDomainListVo
>
listVo
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
for
(
TForecastLibrary
library
:
unPushInfo
)
{
for
(
TForecastLibrary
library
:
unPushInfo
)
{
...
@@ -2605,60 +2607,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2605,60 +2607,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
socialParam
.
setFd_3b0afbe1f94a08
(
library
.
getId
());
socialParam
.
setFd_3b0afbe1f94a08
(
library
.
getId
());
// 薪酬申请编号
// 薪酬申请编号
socialParam
.
setFd_3b3cab77923f44
(
CommonConstants
.
EMPTY_STRING
);
socialParam
.
setFd_3b3cab77923f44
(
CommonConstants
.
EMPTY_STRING
);
String
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
doJointSocialTask
.
asynchronousEkpForecastSocial
(
socialParam
,
library
);
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
//更新推送状态为已推送的列表
pushList
.
add
(
library
.
getId
());
if
(
pushList
.
size
()
>=
CommonConstants
.
FIVES_INT
)
{
baseMapper
.
updatePushStatus
(
pushList
);
pushList
.
clear
();
}
}
else
{
if
(
map
.
get
(
body
)
>
0
)
{
int
i
=
map
.
get
(
body
)
+
1
;
map
.
put
(
body
,
i
);
idMap
.
put
(
body
,
library
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
baseMapper
.
updatePushStatus
(
pushList
);
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
}
else
{
map
.
put
(
body
,
1
);
idMap
.
put
(
body
,
library
.
getId
());
}
}
}
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setTitle
(
key
);
error
.
setLinkId
(
idMap
.
get
(
key
));
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
//更新推送状态
if
(
Common
.
isNotNull
(
pushList
))
{
baseMapper
.
updatePushStatus
(
pushList
);
}
}
}
}
public
void
initEkpPushFundParam
(
List
<
TForecastLibrary
>
unPushInfo
)
{
public
void
initEkpPushFundParam
(
List
<
TForecastLibrary
>
unPushInfo
)
{
List
<
String
>
pushList
=
new
ArrayList
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
R
<
TSettleDomainListVo
>
listVo
;
R
<
TSettleDomainListVo
>
listVo
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
for
(
TForecastLibrary
library
:
unPushInfo
)
{
for
(
TForecastLibrary
library
:
unPushInfo
)
{
...
@@ -2788,53 +2741,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2788,53 +2741,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
fundParam
.
setFd_3b0afbaf10df2c
(
library
.
getId
());
fundParam
.
setFd_3b0afbaf10df2c
(
library
.
getId
());
// 薪酬申请编号
// 薪酬申请编号
fundParam
.
setFd_3b3cabde83d1d0
(
CommonConstants
.
EMPTY_STRING
);
fundParam
.
setFd_3b3cabde83d1d0
(
CommonConstants
.
EMPTY_STRING
);
String
body
=
ekpFundUtil
.
sendToEKP
(
fundParam
);
doJointSocialTask
.
asynchronousEkpForecastFund
(
fundParam
,
library
);
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
//更新推送状态为已推送的列表
pushList
.
add
(
library
.
getId
());
if
(
pushList
.
size
()
>=
CommonConstants
.
FIVES_INT
)
{
baseMapper
.
updatePushStatus
(
pushList
);
pushList
.
clear
();
}
}
else
{
if
(
map
.
get
(
body
)
>
0
)
{
int
i
=
map
.
get
(
body
)
+
1
;
map
.
put
(
body
,
i
);
idMap
.
put
(
body
,
library
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
baseMapper
.
updatePushStatus
(
pushList
);
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
}
else
{
map
.
put
(
body
,
1
);
idMap
.
put
(
body
,
library
.
getId
());
}
}
}
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setLinkId
(
idMap
.
get
(
key
));
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
//更新推送状态
if
(
Common
.
isNotNull
(
pushList
))
{
baseMapper
.
updatePushStatus
(
pushList
);
}
}
}
}
...
@@ -2883,35 +2790,28 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -2883,35 +2790,28 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
}
}
int
isSum
=
0
;
if
(
Common
.
isNotNull
(
settleDomain
))
{
if
(
Common
.
isNotNull
(
settleDomain
))
{
// 含有社保,则计算收入
// 含有社保,则计算收入
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
((
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
if
(
Common
.
isNotNull
(
settleDomain
.
getManageServerItem
())
&&
((
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
))))
{
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
))))
{
//预估模式
//预估模式
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
())
&&
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
!
isExist
)
{
if
(!
isExist
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
(),
sourceType
);
settleDomain
.
getManagementFee
(),
sourceType
);
}
}
}
}
}
}
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
((
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
if
(
Common
.
isNotNull
(
settleDomain
.
getRiskServerItem
())
&&
((
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
ONE_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
sourceType
))
||
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
))))
{
&&
CommonConstants
.
TWO_STRING
.
equals
(
sourceType
))))
{
//预估模式
//预估模式
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
())
&&
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
!
isExist
)
{
if
(!
isExist
)
{
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
createIncomeInsurance
(
library
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
settleDomain
.
getRiskFundFee
(),
sourceType
);
settleDomain
.
getRiskFundFee
(),
sourceType
);
}
}
}
}
}
}
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TIncomeServiceImpl.java
View file @
eb21df7e
...
@@ -37,9 +37,9 @@ import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
...
@@ -37,9 +37,9 @@ import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
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.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncome
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
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.entity.TSendEkpError
;
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.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService
;
...
@@ -49,7 +49,6 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
...
@@ -49,7 +49,6 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeVo
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
...
@@ -58,6 +57,10 @@ import java.io.IOException;
...
@@ -58,6 +57,10 @@ import java.io.IOException;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.ThreadPoolExecutor
;
import
java.util.concurrent.TimeUnit
;
/**
/**
* 收入明细表
* 收入明细表
...
@@ -78,9 +81,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -78,9 +81,6 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
@Autowired
@Autowired
private
EkpIncomeUtil
ekpIncomeUtil
;
private
EkpIncomeUtil
ekpIncomeUtil
;
@Autowired
private
TPaymentInfoMapper
tPaymentInfoMapper
;
@Autowired
@Autowired
private
DoJointSocialTask
doJointSocialTask
;
private
DoJointSocialTask
doJointSocialTask
;
...
@@ -288,421 +288,92 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -288,421 +288,92 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
* @return: boolean
* @return: boolean
**/
**/
@Override
@Override
public
void
saveBathDetail
(
List
<
TIncomeDetail
>
tIncomeDetailList
)
{
public
boolean
saveBathDetail
(
TIncomeDetail
tIncomeDetail
,
TPaymentInfo
paymentInfo
)
{
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
if
(
Common
.
isEmpty
(
tIncomeDetail
.
getEmpIdcard
())
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
||
Common
.
isEmpty
(
tIncomeDetail
.
getDeptId
())
for
(
TIncomeDetail
tIncomeDetail
:
tIncomeDetailList
)
{
||
Common
.
isEmpty
(
tIncomeDetail
.
getPayMonth
()))
{
// 获取对应信息的统计表,根据项目配置,判断是否可以加一条统计:
return
false
;
TIncome
income
=
new
TIncome
();
}
income
.
setEmpIdcard
(
tIncomeDetail
.
getEmpIdcard
());
// 获取对应信息的统计表,根据项目配置,判断是否可以加一条统计:
income
.
setDeptId
(
tIncomeDetail
.
getDeptId
());
TIncome
income
=
new
TIncome
();
List
<
TIncome
>
incomeList
=
baseMapper
.
getTIncomeList
(
income
);
income
.
setEmpIdcard
(
tIncomeDetail
.
getEmpIdcard
());
income
.
setDeptId
(
tIncomeDetail
.
getDeptId
());
List
<
TIncome
>
incomeList
=
baseMapper
.
getTIncomeList
(
income
);
TIncomeDetail
detail
=
new
TIncomeDetail
();
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setEmpIdcard
(
tIncomeDetail
.
getEmpIdcard
());
detail
.
setEmpIdcard
(
tIncomeDetail
.
getEmpIdcard
());
detail
.
setDeptId
(
tIncomeDetail
.
getDeptId
());
detail
.
setDeptId
(
tIncomeDetail
.
getDeptId
());
List
<
TIncomeDetail
>
detailList
=
tIncomeDetailService
.
getTIncomeDetailList
(
detail
);
List
<
TIncomeDetail
>
detailList
=
tIncomeDetailService
.
getTIncomeDetailList
(
detail
);
tIncomeDetail
.
setCreateTime
(
new
Date
());
tIncomeDetail
.
setDataCreateMonth
(
DateUtil
.
addMonth
(
0
));
tIncomeDetail
.
setCreateTime
(
new
Date
());
tIncomeDetailService
.
save
(
tIncomeDetail
);
tIncomeDetail
.
setDataCreateMonth
(
DateUtil
.
addMonth
(
0
));
tPaymentInfoMapper
.
updateByIncome
(
tIncomeDetail
.
getSourceId
());
tIncomeDetailService
.
save
(
tIncomeDetail
);
// 不存在,直接新增
// 不存在,直接新增
if
(
incomeList
==
null
||
incomeList
.
isEmpty
())
{
if
(
incomeList
==
null
||
incomeList
.
isEmpty
())
{
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
return
this
.
savePaymentIncome
(
tIncomeDetail
,
paymentInfo
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
}
else
{
this
.
save
(
income
);
// 核心判断
return
this
.
copyCore
(
tIncomeDetail
,
incomeList
,
detailList
);
}
}
@Override
public
void
pushDetail
()
{
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
50
,
50
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
List
<
TIncome
>
list
=
baseMapper
.
selectList
(
Wrappers
.<
TIncome
>
query
().
lambda
()
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
));
ConcurrentHashMap
<
String
,
Integer
>
map
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
String
>
idMap
=
new
ConcurrentHashMap
<>();
//收入更新
List
<
TIncome
>
updateList
=
new
ArrayList
<>();
threadPool
.
execute
(()
->
{
for
(
TIncome
income
:
list
)
{
String
sendBack
=
this
.
getSendBack
(
income
);
String
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
income
.
setEkpId
(
sendBack
);
updateList
.
add
(
income
);
if
(
updateList
.
size
()
>=
CommonConstants
.
FIVES_INT
)
{
baseMapper
.
updateIncomeById
(
updateList
);
updateList
.
clear
();
}
}
else
{
}
else
{
if
(
map
.
get
(
sendBack
)
>
0
)
{
if
(
map
.
get
(
sendBack
)
>
0
)
{
int
i
=
map
.
get
(
sendBack
)
+
1
;
int
i
=
map
.
get
(
sendBack
)
+
1
;
map
.
put
(
sendBack
,
i
);
map
.
put
(
sendBack
,
i
);
idMap
.
put
(
sendBack
,
income
.
getId
());
idMap
.
put
(
sendBack
,
income
.
getId
());
//单个异常超过十次,保存异常内容
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
if
(
i
>=
10
)
{
for
(
String
key:
map
.
keySet
())
{
baseMapper
.
updateIncomeById
(
updateList
);
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
income
.
getId
());
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
key
);
error
.
setTitle
(
entry
.
getKey
()
);
error
.
setNums
(
map
.
get
(
key
));
error
.
setNums
(
entry
.
getValue
(
));
tSendEkpErrorService
.
save
(
error
);
tSendEkpErrorService
.
save
(
error
);
}
}
break
;
break
;
}
}
}
else
{
}
else
{
map
.
put
(
sendBack
,
1
);
map
.
put
(
sendBack
,
1
);
idMap
.
put
(
sendBack
,
income
.
getId
());
idMap
.
put
(
sendBack
,
income
.
getId
());
}
}
}
}
this
.
updateById
(
income
);
}
else
{
// 判断,比例,直接加
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tIncomeDetail
.
getFeeMode
()))
{
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
this
.
save
(
income
);
String
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
}
else
{
if
(
map
.
get
(
sendBack
)
>
0
)
{
int
i
=
map
.
get
(
sendBack
)
+
1
;
map
.
put
(
sendBack
,
i
);
idMap
.
put
(
sendBack
,
income
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
}
else
{
map
.
put
(
sendBack
,
1
);
idMap
.
put
(
sendBack
,
income
.
getId
());
}
}
this
.
updateById
(
income
);
}
else
{
Map
<
String
,
Integer
>
numMap
=
new
HashMap
<>();
Map
<
String
,
Integer
>
incomeMap
=
new
HashMap
<>();
// 商险Map
Map
<
String
,
Integer
>
insureMap
=
new
HashMap
<>();
Integer
nums
;
Integer
insureNums
;
for
(
TIncomeDetail
detail1
:
detailList
)
{
nums
=
numMap
.
get
(
detail1
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
detail1
.
getSourceType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
detail1
.
getFeeType
());
if
(
Common
.
isEmpty
(
nums
))
{
nums
=
CommonConstants
.
ZERO_INT
;
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
detail1
.
getRedData
()))
{
nums
--;
}
else
{
nums
++;
}
numMap
.
put
(
detail1
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
detail1
.
getSourceType
()
+
CommonConstants
.
DOWN_LINE_STRING
+
detail1
.
getFeeType
(),
nums
);
}
for
(
TIncome
income1
:
incomeList
)
{
nums
=
incomeMap
.
get
(
income1
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
income1
.
getFeeType
());
if
(
Common
.
isEmpty
(
nums
))
{
nums
=
CommonConstants
.
ZERO_INT
;
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
income1
.
getRedData
()))
{
nums
--;
}
else
{
nums
++;
}
incomeMap
.
put
(
income1
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
income1
.
getFeeType
(),
nums
);
insureNums
=
insureMap
.
get
(
income1
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
income1
.
getFeeType
());
if
(
Common
.
isEmpty
(
insureNums
))
{
insureNums
=
CommonConstants
.
ZERO_INT
;
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
income1
.
getRedData
()))
{
insureNums
--;
}
else
{
insureNums
++;
}
insureMap
.
put
(
income1
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
income1
.
getFeeType
(),
insureNums
);
}
// 金额人数、人次,需要判重
// 社保、公积金(收入来源:1社保2公积金3商险4薪资)
if
(
CommonConstants
.
ONE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
())
||
CommonConstants
.
TWO_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tIncomeDetail
.
getRedData
()))
{
if
(
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
==
null
||
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
<=
CommonConstants
.
ZERO_INT
)
{
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
this
.
save
(
income
);
String
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
}
else
{
if
(
map
.
get
(
sendBack
)
>
0
)
{
int
i
=
map
.
get
(
sendBack
)
+
1
;
map
.
put
(
sendBack
,
i
);
idMap
.
put
(
sendBack
,
income
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
}
else
{
map
.
put
(
sendBack
,
1
);
idMap
.
put
(
sendBack
,
income
.
getId
());
}
}
this
.
updateById
(
income
);
}
}
else
{
// 红冲判断:当本类型是最大值,才可以红冲
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
{
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
this
.
save
(
income
);
String
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
}
else
{
if
(
map
.
get
(
sendBack
)
>
0
)
{
int
i
=
map
.
get
(
sendBack
)
+
1
;
map
.
put
(
sendBack
,
i
);
idMap
.
put
(
sendBack
,
income
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
}
else
{
map
.
put
(
sendBack
,
1
);
idMap
.
put
(
sendBack
,
income
.
getId
());
}
}
this
.
updateById
(
income
);
}
}
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
tIncomeDetail
.
getSourceType
()))
{
// 商险。收费方式:2金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tIncomeDetail
.
getFeeMode
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
tIncomeDetail
.
getRedData
()))
{
if
(
insureMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
==
null
||
insureMap
.
get
(
tIncomeDetail
.
getDataCreateMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
<=
CommonConstants
.
ZERO_INT
)
{
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
this
.
save
(
income
);
String
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
}
else
{
if
(
map
.
get
(
sendBack
)
>
0
)
{
int
i
=
map
.
get
(
sendBack
)
+
1
;
map
.
put
(
sendBack
,
i
);
idMap
.
put
(
sendBack
,
income
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
}
else
{
map
.
put
(
sendBack
,
1
);
idMap
.
put
(
sendBack
,
income
.
getId
());
}
}
this
.
updateById
(
income
);
}
}
else
{
if
(
this
.
redDateJudge
(
tIncomeDetail
,
numMap
))
{
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
this
.
save
(
income
);
String
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
}
else
{
if
(
map
.
get
(
sendBack
)
>
0
)
{
int
i
=
map
.
get
(
sendBack
)
+
1
;
map
.
put
(
sendBack
,
i
);
idMap
.
put
(
sendBack
,
income
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
}
else
{
map
.
put
(
sendBack
,
1
);
idMap
.
put
(
sendBack
,
income
.
getId
());
}
}
this
.
updateById
(
income
);
}
}
}
else
{
// 各个模式累加逻辑:
this
.
judgeMixModel
(
tIncomeDetail
,
numMap
,
incomeMap
);
}
}
else
{
// 薪资。收费方式:2金额-人数
if
(
CommonConstants
.
TWO_STRING
.
equals
(
tIncomeDetail
.
getFeeMode
()))
{
if
(
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
==
null
||
incomeMap
.
get
(
tIncomeDetail
.
getPayMonth
()
+
CommonConstants
.
DOWN_LINE_STRING
+
tIncomeDetail
.
getFeeType
())
<=
CommonConstants
.
ZERO_INT
)
{
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
this
.
save
(
income
);
String
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
}
else
{
if
(
map
.
get
(
sendBack
)
>
0
)
{
int
i
=
map
.
get
(
sendBack
)
+
1
;
map
.
put
(
sendBack
,
i
);
idMap
.
put
(
sendBack
,
income
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
}
else
{
map
.
put
(
sendBack
,
1
);
idMap
.
put
(
sendBack
,
income
.
getId
());
}
}
this
.
updateById
(
income
);
}
}
else
{
// 3金额-人次
// 各个模式累加逻辑:
this
.
judgeMixModel
(
tIncomeDetail
,
numMap
,
incomeMap
);
}
}
}
}
}
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
idMap
.
get
(
key
));
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
}
@Override
public
void
pushDetail
()
{
List
<
TIncome
>
list
=
baseMapper
.
selectList
(
Wrappers
.<
TIncome
>
query
().
lambda
()
.
eq
(
TIncome:
:
getSendStatus
,
CommonConstants
.
ZERO_STRING
));
String
sendBack
;
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
//收入更新
List
<
TIncome
>
updateList
=
new
ArrayList
<>();
for
(
TIncome
income
:
list
)
{
sendBack
=
this
.
getSendBack
(
income
);
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
updateList
.
add
(
income
);
if
(
updateList
.
size
()
>=
CommonConstants
.
FIVES_INT
)
{
baseMapper
.
updateIncomeById
(
updateList
);
updateList
.
clear
();
}
}
else
{
if
(
map
.
get
(
sendBack
)
>
0
)
{
int
i
=
map
.
get
(
sendBack
)
+
1
;
map
.
put
(
sendBack
,
i
);
idMap
.
put
(
sendBack
,
income
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
baseMapper
.
updateIncomeById
(
updateList
);
for
(
String
key:
map
.
keySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
key
);
error
.
setNums
(
map
.
get
(
key
));
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
}
else
{
map
.
put
(
sendBack
,
1
);
idMap
.
put
(
sendBack
,
income
.
getId
());
}
}
}
}
}
);
for
(
String
key:
map
.
ke
ySet
())
{
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entr
ySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setType
(
CommonConstants
.
FIVE_STRING
);
error
.
setLinkId
(
idMap
.
get
(
key
));
error
.
setLinkId
(
idMap
.
get
(
entry
.
getKey
()
));
error
.
setTitle
(
key
);
error
.
setTitle
(
entry
.
getKey
()
);
error
.
setNums
(
map
.
get
(
key
));
error
.
setNums
(
entry
.
getValue
(
));
tSendEkpErrorService
.
save
(
error
);
tSendEkpErrorService
.
save
(
error
);
}
}
baseMapper
.
updateIncomeById
(
updateList
);
baseMapper
.
updateIncomeById
(
updateList
);
...
@@ -742,6 +413,19 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
...
@@ -742,6 +413,19 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return
true
;
return
true
;
}
}
// 复制并保存
private
boolean
savePaymentIncome
(
TIncomeDetail
tIncomeDetail
,
TPaymentInfo
paymentInfo
)
{
TIncome
income
=
new
TIncome
();
BeanUtil
.
copyProperties
(
tIncomeDetail
,
income
);
income
.
setSendStatus
(
CommonConstants
.
ZERO_STRING
);
income
.
setApplyNo
(
tIncomeDetail
.
getApplyNo
());
this
.
save
(
income
);
long
start
=
System
.
currentTimeMillis
();
doJointSocialTask
.
asynchronousEkpIncomePayment
(
income
,
paymentInfo
);
log
.
error
(
"线程执行耗时:"
+
(
System
.
currentTimeMillis
()-
start
));
return
true
;
}
/**
/**
* @param income 收入
* @param income 收入
* @param sendParam 目标格式
* @param sendParam 目标格式
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
eb21df7e
...
@@ -24,6 +24,8 @@ import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
...
@@ -24,6 +24,8 @@ import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -58,6 +60,7 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TEkpChangeDeptLogService;
...
@@ -58,6 +60,7 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TEkpChangeDeptLogService;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService
;
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.util.DoJointSocialTask
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -72,7 +75,6 @@ import java.math.BigDecimal;
...
@@ -72,7 +75,6 @@ import java.math.BigDecimal;
import
java.math.RoundingMode
;
import
java.math.RoundingMode
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.text.NumberFormat
;
import
java.text.NumberFormat
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
...
@@ -138,6 +140,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -138,6 +140,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Autowired
@Autowired
private
TEkpChangeDeptLogService
tEkpChangeDeptLogService
;
private
TEkpChangeDeptLogService
tEkpChangeDeptLogService
;
@Autowired
private
DoJointSocialTask
doJointSocialTask
;
/**
/**
* 缴费库简单分页查询
* 缴费库简单分页查询
*
*
...
@@ -2515,6 +2520,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2515,6 +2520,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//获取所有未推送的社保实缴明细数据
//获取所有未推送的社保实缴明细数据
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
if
(
Common
.
isNotNull
(
unPushInfo
))
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
//推送数据封装并推送
...
@@ -2527,6 +2533,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2527,6 +2533,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//获取所有未推送的公积金实缴明细数据
//获取所有未推送的公积金实缴明细数据
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
if
(
Common
.
isNotNull
(
unPushInfo
))
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
//推送数据封装并推送
...
@@ -2535,17 +2542,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2535,17 +2542,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
@Override
@Override
public
void
pushPaymentSocialFundInfo
()
{
public
void
pushPaymentSocialFundInfo
(
String
socialHouse
,
String
fundHouse
,
String
settleDomainId
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
String
key
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
PAYMENT_SOCIAL_PUSH
;
String
key
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
PAYMENT_SOCIAL_PUSH
;
redisUtil
.
set
(
key
,
user
.
getId
(),
36000L
);
redisUtil
.
set
(
key
,
user
.
getId
(),
36000L
);
try
{
try
{
//手动推送未推送的社保公积金明细数据
//手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal
(
user
);
createPaymentSocialInfoReal
(
user
,
socialHouse
,
settleDomainId
);
createPaymentFundInfoReal
(
user
);
createPaymentFundInfoReal
(
user
,
fundHouse
,
settleDomainId
);
//推送社保公积金收入数据
//推送社保公积金收入数据
createPaymentInfoIncomeReal
(
user
);
createPaymentInfoIncomeReal
(
user
,
socialHouse
,
settleDomainId
);
createPaymentFundIncomeReal
(
user
);
createPaymentFundIncomeReal
(
user
,
fundHouse
,
settleDomainId
);
redisUtil
.
remove
(
key
);
redisUtil
.
remove
(
key
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"社保缴费库:"
+
e
);
log
.
error
(
"社保缴费库:"
+
e
);
...
@@ -2553,13 +2560,30 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2553,13 +2560,30 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
}
@Override
public
R
<
Boolean
>
batchUpdatePaymentInfo
(
TPaymentInfoSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
))
{
return
R
.
failed
(
"获取登录用户信息失败!"
);
}
searchVo
.
setCreateBy
(
user
.
getId
());
List
<
String
>
list
=
baseMapper
.
getTPaymentInfoList
(
searchVo
);
if
(
Common
.
isEmpty
(
list
))
{
return
R
.
failed
(
"未找到本人创建的未标识确认无误的数据"
);
}
else
{
LambdaUpdateWrapper
<
TPaymentInfo
>
updateWrapper
=
new
UpdateWrapper
<
TPaymentInfo
>().
lambda
();
updateWrapper
.
set
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
).
in
(
TPaymentInfo:
:
getId
,
list
);
return
R
.
ok
(
this
.
update
(
updateWrapper
));
}
}
@Override
@Override
public
void
createPaymentInfoIncome
()
{
public
void
createPaymentInfoIncome
()
{
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
between
(
TPaymentInfo:
:
getCreateTime
,
LocalDateTimeUtils
.
getThatDayStartTime
(
LocalDateTime
.
now
().
plusDays
(-
1
)),
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
LocalDateTimeUtils
.
getDayStart
(
LocalDateTime
.
now
())
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
if
(
Common
.
isNotNull
(
sumList
))
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成收入
//生成收入
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
...
@@ -2569,8 +2593,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2569,8 +2593,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
@Override
public
void
createPaymentFundIncome
()
{
public
void
createPaymentFundIncome
()
{
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
.
between
(
TPaymentInfo:
:
getCreateTime
,
LocalDateTimeUtils
.
getThatDayStartTime
(
LocalDateTime
.
now
().
plusDays
(-
1
)),
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
LocalDateTimeUtils
.
getDayStart
(
LocalDateTime
.
now
())
)
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
)
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
if
(
Common
.
isNotNull
(
sumList
))
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成公积金收入
//生成公积金收入
...
@@ -2578,47 +2602,79 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2578,47 +2602,79 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
}
}
public
void
createPaymentSocialInfoReal
(
YifuUser
user
)
{
public
void
createPaymentSocialInfoReal
(
YifuUser
user
,
String
socialHouse
,
String
settleDomainId
)
{
//获取所有未推送的社保实缴明细数据
//获取所有未推送的社保实缴明细数据
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
LambdaQueryWrapper
<
TPaymentInfo
>
wrapper
=
Wrappers
.
lambdaQuery
();
.
eq
(
TPaymentInfo:
:
getCreateBy
,
user
.
getId
())
wrapper
.
eq
(
TPaymentInfo:
:
getCreateBy
,
user
.
getId
());
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
wrapper
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
);
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
wrapper
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
);
wrapper
.
isNotNull
(
TPaymentInfo:
:
getSocialId
);
if
(
Common
.
isNotNull
(
socialHouse
))
{
wrapper
.
eq
(
TPaymentInfo:
:
getSocialHousehold
,
socialHouse
);
}
if
(
Common
.
isNotNull
(
settleDomainId
))
{
wrapper
.
eq
(
TPaymentInfo:
:
getSettleDomainId
,
settleDomainId
);
}
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
selectList
(
wrapper
);
if
(
Common
.
isNotNull
(
unPushInfo
))
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
//推送数据封装并推送
initEkpPushSocialParam
(
unPushInfo
);
initEkpPushSocialParam
(
unPushInfo
);
}
}
}
}
public
void
createPaymentFundInfoReal
(
YifuUser
user
)
{
public
void
createPaymentFundInfoReal
(
YifuUser
user
,
String
fundHouse
,
String
settleDomainId
)
{
//获取所有未推送的公积金实缴明细数据
//获取所有未推送的公积金实缴明细数据
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
LambdaQueryWrapper
<
TPaymentInfo
>
wrapper
=
Wrappers
.
lambdaQuery
();
.
eq
(
TPaymentInfo:
:
getCreateBy
,
user
.
getId
())
wrapper
.
eq
(
TPaymentInfo:
:
getCreateBy
,
user
.
getId
());
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
)
wrapper
.
eq
(
TPaymentInfo:
:
getPushStatus
,
CommonConstants
.
ONE_STRING
);
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
wrapper
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
);
wrapper
.
isNotNull
(
TPaymentInfo:
:
getFundId
);
if
(
Common
.
isNotNull
(
fundHouse
))
{
wrapper
.
eq
(
TPaymentInfo:
:
getProvidentHousehold
,
fundHouse
);
}
if
(
Common
.
isNotNull
(
settleDomainId
))
{
wrapper
.
eq
(
TPaymentInfo:
:
getSettleDomainId
,
settleDomainId
);
}
List
<
TPaymentInfo
>
unPushInfo
=
baseMapper
.
selectList
(
wrapper
);
if
(
Common
.
isNotNull
(
unPushInfo
))
{
if
(
Common
.
isNotNull
(
unPushInfo
))
{
//推送数据封装并推送
//推送数据封装并推送
initEkpPushFundParam
(
unPushInfo
);
initEkpPushFundParam
(
unPushInfo
);
}
}
}
}
public
void
createPaymentInfoIncomeReal
(
YifuUser
user
)
{
public
void
createPaymentInfoIncomeReal
(
YifuUser
user
,
String
socialHouse
,
String
settleDomainId
)
{
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
LambdaQueryWrapper
<
TPaymentInfo
>
wrapper
=
Wrappers
.
lambdaQuery
();
.
eq
(
TPaymentInfo:
:
getCreateBy
,
user
.
getId
())
wrapper
.
eq
(
TPaymentInfo:
:
getCreateBy
,
user
.
getId
());
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
wrapper
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
);
.
isNotNull
(
TPaymentInfo:
:
getSocialId
));
wrapper
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
);
wrapper
.
isNotNull
(
TPaymentInfo:
:
getSocialId
);
if
(
Common
.
isNotNull
(
socialHouse
))
{
wrapper
.
eq
(
TPaymentInfo:
:
getSocialHousehold
,
socialHouse
);
}
if
(
Common
.
isNotNull
(
settleDomainId
))
{
wrapper
.
eq
(
TPaymentInfo:
:
getSettleDomainId
,
settleDomainId
);
}
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
wrapper
);
if
(
Common
.
isNotNull
(
sumList
))
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成收入
//生成收入
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
createIncomeInfo
(
sumList
,
CommonConstants
.
ONE_STRING
);
}
}
}
}
public
void
createPaymentFundIncomeReal
(
YifuUser
user
)
{
public
void
createPaymentFundIncomeReal
(
YifuUser
user
,
String
fundHouse
,
String
settleDomainId
)
{
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
Wrappers
.<
TPaymentInfo
>
query
().
lambda
()
LambdaQueryWrapper
<
TPaymentInfo
>
wrapper
=
Wrappers
.
lambdaQuery
();
.
eq
(
TPaymentInfo:
:
getCreateBy
,
user
.
getId
())
wrapper
.
eq
(
TPaymentInfo:
:
getCreateBy
,
user
.
getId
());
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
)
wrapper
.
eq
(
TPaymentInfo:
:
getIncomeStatus
,
CommonConstants
.
ONE_STRING
);
.
isNotNull
(
TPaymentInfo:
:
getFundId
));
wrapper
.
eq
(
TPaymentInfo:
:
getLockStatus
,
CommonConstants
.
ONE_STRING
);
wrapper
.
isNotNull
(
TPaymentInfo:
:
getFundId
);
if
(
Common
.
isNotNull
(
fundHouse
))
{
wrapper
.
eq
(
TPaymentInfo:
:
getSocialHousehold
,
fundHouse
);
}
if
(
Common
.
isNotNull
(
settleDomainId
))
{
wrapper
.
eq
(
TPaymentInfo:
:
getSettleDomainId
,
settleDomainId
);
}
List
<
TPaymentInfo
>
sumList
=
baseMapper
.
selectList
(
wrapper
);
if
(
Common
.
isNotNull
(
sumList
))
{
if
(
Common
.
isNotNull
(
sumList
))
{
//生成公积金收入
//生成公积金收入
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
createIncomeInfo
(
sumList
,
CommonConstants
.
TWO_STRING
);
...
@@ -2637,13 +2693,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2637,13 +2693,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
public
void
initEkpPushSocialParam
(
List
<
TPaymentInfo
>
unPushInfo
)
{
public
void
initEkpPushSocialParam
(
List
<
TPaymentInfo
>
unPushInfo
)
{
List
<
String
>
pushList
=
new
ArrayList
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
List
<
TSettleDomainSelectVo
>
settleDomainR
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
R
<
TSettleDomainListVo
>
listVo
;
R
<
TSettleDomainListVo
>
listVo
;
for
(
TPaymentInfo
library
:
unPushInfo
)
{
for
(
TPaymentInfo
library
:
unPushInfo
)
{
//获取项目信息
//获取项目信息
TSettleDomain
settleDomain
=
new
TSettleDomain
();
TSettleDomain
settleDomain
=
new
TSettleDomain
();
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoById
(
library
.
getSettleDomainId
());
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoById
(
library
.
getSettleDomainId
());
...
@@ -2873,60 +2927,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -2873,60 +2927,12 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
socialParam
.
setFd_3b0afbe1f94a08
(
library
.
getId
());
socialParam
.
setFd_3b0afbe1f94a08
(
library
.
getId
());
// 薪酬申请编号
// 薪酬申请编号
socialParam
.
setFd_3b3cab77923f44
(
CommonConstants
.
EMPTY_STRING
);
socialParam
.
setFd_3b3cab77923f44
(
CommonConstants
.
EMPTY_STRING
);
String
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
doJointSocialTask
.
asynchronousEkpPaymentSocial
(
socialParam
,
library
);
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
//更新推送状态为已推送的列表
pushList
.
add
(
library
.
getId
());
if
(
pushList
.
size
()
>=
CommonConstants
.
FIVES_INT
)
{
baseMapper
.
updatePushStatus
(
pushList
);
pushList
.
clear
();
}
}
else
{
if
(
map
.
get
(
body
)
>
0
)
{
int
i
=
map
.
get
(
body
)
+
1
;
idMap
.
put
(
body
,
library
.
getId
());
map
.
put
(
body
,
i
);
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
baseMapper
.
updatePushStatus
(
pushList
);
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
entry
.
getKey
());
error
.
setNums
(
entry
.
getValue
());
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
}
else
{
map
.
put
(
body
,
1
);
idMap
.
put
(
body
,
library
.
getId
());
}
}
}
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setLinkId
(
idMap
.
get
(
entry
.
getKey
()));
error
.
setTitle
(
entry
.
getKey
());
error
.
setNums
(
entry
.
getValue
());
tSendEkpErrorService
.
save
(
error
);
}
//更新推送状态
if
(
Common
.
isNotNull
(
pushList
))
{
baseMapper
.
updatePushStatus
(
pushList
);
}
}
}
}
public
void
initEkpPushFundParam
(
List
<
TPaymentInfo
>
unPushInfo
)
{
public
void
initEkpPushFundParam
(
List
<
TPaymentInfo
>
unPushInfo
)
{
List
<
String
>
pushList
=
new
ArrayList
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
idMap
=
new
HashMap
<>();
List
<
TSettleDomainSelectVo
>
settleDomainR
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
R
<
TSettleDomainListVo
>
listVo
;
R
<
TSettleDomainListVo
>
listVo
;
for
(
TPaymentInfo
library
:
unPushInfo
)
{
for
(
TPaymentInfo
library
:
unPushInfo
)
{
...
@@ -3051,58 +3057,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3051,58 +3057,11 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
else
{
}
else
{
fundParam
.
setFd_3b43922217c6f8
(
CommonConstants
.
EMPTY_STRING
);
fundParam
.
setFd_3b43922217c6f8
(
CommonConstants
.
EMPTY_STRING
);
}
}
String
body
=
ekpFundUtil
.
sendToEKP
(
fundParam
);
doJointSocialTask
.
asynchronousEkpPaymentFund
(
fundParam
,
library
);
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
//更新推送状态为已推送的列表
pushList
.
add
(
library
.
getId
());
if
(
pushList
.
size
()
>=
CommonConstants
.
FIVES_INT
)
{
baseMapper
.
updatePushStatus
(
pushList
);
pushList
.
clear
();
}
}
else
{
if
(
map
.
get
(
body
)
>
0
)
{
int
i
=
map
.
get
(
body
)
+
1
;
map
.
put
(
body
,
i
);
idMap
.
put
(
body
,
library
.
getId
());
//单个异常超过十次,保存异常内容
if
(
i
>=
10
)
{
baseMapper
.
updatePushStatus
(
pushList
);
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
entry
.
getKey
());
error
.
setNums
(
entry
.
getValue
());
tSendEkpErrorService
.
save
(
error
);
}
break
;
}
}
else
{
map
.
put
(
body
,
1
);
idMap
.
put
(
body
,
library
.
getId
());
}
}
}
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
map
.
entrySet
())
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setLinkId
(
idMap
.
get
(
entry
.
getKey
()));
error
.
setTitle
(
entry
.
getKey
());
error
.
setNums
(
entry
.
getValue
());
tSendEkpErrorService
.
save
(
error
);
}
//更新推送状态
if
(
Common
.
isNotNull
(
pushList
))
{
baseMapper
.
updatePushStatus
(
pushList
);
}
}
}
}
public
void
createIncomeInfo
(
List
<
TPaymentInfo
>
updateList
,
String
socialFundFlag
)
{
public
void
createIncomeInfo
(
List
<
TPaymentInfo
>
updateList
,
String
socialFundFlag
)
{
List
<
TIncomeDetail
>
detailList
=
new
ArrayList
<>();
for
(
TPaymentInfo
paymentInfo
:
updateList
)
{
for
(
TPaymentInfo
paymentInfo
:
updateList
)
{
boolean
exitFlag
=
false
;
boolean
exitFlag
=
false
;
List
<
TIncomeDetail
>
exitIncome
;
List
<
TIncomeDetail
>
exitIncome
;
...
@@ -3157,14 +3116,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3157,14 +3116,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
&&
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
||
(
settleDomain
.
getManageServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
socialFundFlag
)))
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
&&
CommonConstants
.
TWO_STRING
.
equals
(
socialFundFlag
)))
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getManagementTag
()))
{
//预估模式
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
//预估模式只有按人次和人数收费
if
(!
exitFlag
)
{
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
(),
socialFundFlag
,
detailList
);
}
}
else
{
BigDecimal
gMoney
;
BigDecimal
gMoney
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getManagementType
()))
{
gMoney
=
settleDomain
.
getManagementFee
();
gMoney
=
settleDomain
.
getManagementFee
();
...
@@ -3185,7 +3137,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3185,7 +3137,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if
(!
exitFlag
||
isSum
==
1
)
{
if
(!
exitFlag
||
isSum
==
1
)
{
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
ONE_STRING
,
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
settleDomain
.
getManagementFee
().
toString
(),
settleDomain
.
getManagementType
(),
gMoney
,
socialFundFlag
,
detailList
);
gMoney
,
socialFundFlag
);
}
}
}
}
}
}
...
@@ -3193,47 +3145,38 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3193,47 +3145,38 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
&&
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
||
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
||
(
settleDomain
.
getRiskServerItem
().
contains
(
CommonConstants
.
TWO_STRING
)
&&
CommonConstants
.
TWO_STRING
.
equals
(
socialFundFlag
)))
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
&&
CommonConstants
.
TWO_STRING
.
equals
(
socialFundFlag
)))
&&
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
//预估模式
//预估模式
if
(
CommonConstants
.
ONE_STRING
.
equals
(
settleDomain
.
getMrSettleType
()))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getMrSettleType
())
&&
if
(!
exitFlag
)
{
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
())
)
{
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
BigDecimal
money
;
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
settleDomain
.
getRiskFundFee
(),
socialFundFlag
,
detailList
);
money
=
settleDomain
.
getRiskFundFee
(
);
}
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
}
else
{
money
=
settleDomain
.
getRiskFundFee
();
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
settleDomain
.
getRiskFundTag
()))
{
}
else
{
BigDecimal
money
;
isSum
=
2
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
settleDomain
.
getRiskFundType
()
))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
money
=
settleDomain
.
getRiskFundFee
();
money
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getSocialSum
(),
}
else
if
(
CommonConstants
.
THREE_STRING
.
equals
(
settleDomain
.
getRiskFundType
()))
{
settleDomain
.
getRiskFundFee
().
divide
(
new
BigDecimal
(
"100"
),
money
=
settleDomain
.
getRiskFundFee
(
);
CommonConstants
.
FIVE_INT
,
RoundingMode
.
HALF_UP
)
);
}
else
{
}
else
{
isSum
=
2
;
money
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getProvidentSum
(),
if
(
CommonConstants
.
ONE_STRING
.
equals
(
socialFundFlag
))
{
settleDomain
.
getRiskFundFee
().
divide
(
new
BigDecimal
(
"100"
),
money
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getSocialSum
(),
CommonConstants
.
FIVE_INT
,
RoundingMode
.
HALF_UP
));
settleDomain
.
getRiskFundFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
FIVE_INT
,
RoundingMode
.
HALF_UP
));
}
else
{
money
=
BigDecimalUtils
.
safeMultiply
(
paymentInfo
.
getProvidentSum
(),
settleDomain
.
getRiskFundFee
().
divide
(
new
BigDecimal
(
"100"
),
CommonConstants
.
FIVE_INT
,
RoundingMode
.
HALF_UP
));
}
}
if
(!
exitFlag
||
isSum
==
2
)
{
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
,
socialFundFlag
,
detailList
);
}
}
}
}
if
(!
exitFlag
||
isSum
==
2
)
{
createIncomeInsurance
(
paymentInfo
,
settleDomain
,
CommonConstants
.
TWO_STRING
,
settleDomain
.
getRiskFundFee
().
toString
(),
settleDomain
.
getRiskFundType
(),
money
,
socialFundFlag
);
}
}
}
}
}
}
}
}
}
incomeService
.
saveBathDetail
(
detailList
);
}
}
public
void
createIncomeInsurance
(
TPaymentInfo
library
,
TSettleDomain
settleDomain
,
String
feeType
,
public
void
createIncomeInsurance
(
TPaymentInfo
library
,
TSettleDomain
settleDomain
,
String
feeType
,
String
charges
,
String
feeMode
,
BigDecimal
money
,
String
sourceType
,
String
charges
,
String
feeMode
,
BigDecimal
money
,
String
sourceType
)
{
List
<
TIncomeDetail
>
detailList
)
{
//生成收入数据
//生成收入数据
TIncomeDetail
detail
=
new
TIncomeDetail
();
TIncomeDetail
detail
=
new
TIncomeDetail
();
detail
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
detail
.
setCreateTime
(
DateUtil
.
getCurrentDateTime
());
...
@@ -3262,7 +3205,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
...
@@ -3262,7 +3205,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setMrSettleType
(
settleDomain
.
getMrSettleType
());
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setId
(
CommonConstants
.
NULL
);
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
detail
.
setRedData
(
CommonConstants
.
ZERO_STRING
);
detailList
.
add
(
detail
);
incomeService
.
saveBathDetail
(
detail
,
library
);
}
}
public
String
dateStringInsert
(
String
month
)
{
public
String
dateStringInsert
(
String
month
)
{
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
View file @
eb21df7e
...
@@ -3,13 +3,21 @@ package com.yifu.cloud.plus.v1.yifu.social.util;
...
@@ -3,13 +3,21 @@ package com.yifu.cloud.plus.v1.yifu.social.util;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk
;
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.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.TIncome
;
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.entity.TSendEkpError
;
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.service.TSendEkpErrorService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -31,12 +39,24 @@ public class DoJointSocialTask {
...
@@ -31,12 +39,24 @@ public class DoJointSocialTask {
@Autowired
@Autowired
private
EkpIncomeUtil
ekpIncomeUtil
;
private
EkpIncomeUtil
ekpIncomeUtil
;
@Autowired
private
EkpSocialUtil
ekpSocialUtil
;
@Autowired
private
EkpFundUtil
ekpFundUtil
;
@Autowired
@Autowired
private
TSendEkpErrorService
tSendEkpErrorService
;
private
TSendEkpErrorService
tSendEkpErrorService
;
@Autowired
@Autowired
private
TIncomeMapper
incomeMapper
;
private
TIncomeMapper
incomeMapper
;
@Autowired
private
TPaymentInfoMapper
paymentInfoMapper
;
@Autowired
private
TForecastLibraryMapper
forecastLibraryMapper
;
/**
/**
* @Description: 合同-批量更换负责人
* @Description: 合同-批量更换负责人
* @Author: huyc
* @Author: huyc
...
@@ -83,6 +103,54 @@ public class DoJointSocialTask {
...
@@ -83,6 +103,54 @@ public class DoJointSocialTask {
log
.
info
(
"推送收入到EKP结束"
);
log
.
info
(
"推送收入到EKP结束"
);
}
}
/**
* @Description: 合同-批量更换负责人
* @Author: huyc
* @Date: 2022-7-8
* @return: void
**/
@Async
public
void
asynchronousEkpIncomePayment
(
TIncome
income
,
TPaymentInfo
paymentInfo
)
{
log
.
info
(
"推送收入到EKP-线程开始"
);
try
{
String
sendBack
=
this
.
getSendBack
(
income
);
if
(
Common
.
isEmpty
(
sendBack
)
||
sendBack
.
length
()
!=
32
)
{
sendBack
=
this
.
getSendBack
(
income
);
}
income
.
setSendTime
(
new
Date
());
if
(
Common
.
isNotNull
(
sendBack
)
&&
sendBack
.
length
()
==
32
)
{
income
.
setSendStatus
(
CommonConstants
.
ONE_STRING
);
income
.
setSendMonth
(
DateUtil
.
addMonth
(
0
));
income
.
setEkpId
(
sendBack
);
incomeMapper
.
updateById
(
income
);
paymentInfo
.
setPushStatus
(
CommonConstants
.
ZERO_STRING
);
paymentInfoMapper
.
updateById
(
paymentInfo
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FOUR_STRING
);
error
.
setCreateUserName
(
"收入表推送"
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
sendBack
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
FOUR_STRING
);
error
.
setCreateUserName
(
"收入表推送"
);
error
.
setLinkId
(
income
.
getId
());
error
.
setTitle
(
e
.
getMessage
());
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"推送收入到EKP错误"
,
e
);
}
log
.
info
(
"推送收入到EKP结束"
);
}
/**
/**
* @param income
* @param income
* @Description: 判断类型发送
* @Description: 判断类型发送
...
@@ -241,4 +309,176 @@ public class DoJointSocialTask {
...
@@ -241,4 +309,176 @@ public class DoJointSocialTask {
// 薪酬申请编号
// 薪酬申请编号
sendParam
.
setFd_3b3bf0e75ef6c4
(
income
.
getApplyNo
()==
null
?
""
:
income
.
getApplyNo
());
sendParam
.
setFd_3b3bf0e75ef6c4
(
income
.
getApplyNo
()==
null
?
""
:
income
.
getApplyNo
());
}
}
/**
* @Description: 实缴数据推送
* @Author: huyc
* @Date: 2022-11-17
* @return: void
**/
@Async
public
void
asynchronousEkpPaymentSocial
(
EkpPushSocialParam
socialParam
,
TPaymentInfo
library
)
{
log
.
info
(
"推送社保实缴费用到EKP-线程开始"
);
try
{
String
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
if
(
Common
.
isEmpty
(
body
)
||
body
.
length
()
!=
32
)
{
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
}
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
library
.
setPushStatus
(
CommonConstants
.
ZERO_STRING
);
paymentInfoMapper
.
updateById
(
library
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setCreateUserName
(
"社保实缴费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
body
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setCreateUserName
(
"社保实缴费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
e
.
getMessage
());
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"推送社保实缴费用到EKP错误"
,
e
);
}
log
.
info
(
"推送社保实缴费用到EKP结束"
);
}
/**
* @Description: 实缴数据推送
* @Author: huyc
* @Date: 2022-11-17
* @return: void
**/
@Async
public
void
asynchronousEkpPaymentFund
(
EkpPushFundParam
fundParam
,
TPaymentInfo
library
)
{
log
.
info
(
"推送公积金实缴费用到EKP-线程开始"
);
try
{
String
body
=
ekpFundUtil
.
sendToEKP
(
fundParam
);
if
(
Common
.
isEmpty
(
body
)
||
body
.
length
()
!=
32
)
{
body
=
ekpFundUtil
.
sendToEKP
(
fundParam
);
}
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
library
.
setPushStatus
(
CommonConstants
.
ZERO_STRING
);
paymentInfoMapper
.
updateById
(
library
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setCreateUserName
(
"公积金实缴费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
body
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
THREE_STRING
);
error
.
setCreateUserName
(
"公积金实缴费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
e
.
getMessage
());
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"公积金推送实缴费用到EKP错误"
,
e
);
}
log
.
info
(
"公积金推送实缴费用到EKP结束"
);
}
/**
* @Description: 预估数据推送
* @Author: huyc
* @Date: 2022-11-17
* @return: void
**/
@Async
public
void
asynchronousEkpForecastSocial
(
EkpPushSocialParam
socialParam
,
TForecastLibrary
library
)
{
log
.
info
(
"推送社保预估费用到EKP-线程开始"
);
try
{
String
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
if
(
Common
.
isEmpty
(
body
)
||
body
.
length
()
!=
32
)
{
body
=
ekpSocialUtil
.
sendToEKP
(
socialParam
);
}
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
library
.
setDataPush
(
CommonConstants
.
ONE_INT
);
forecastLibraryMapper
.
updateById
(
library
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"社保预估费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
body
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"社保预估费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
e
.
getMessage
());
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"推送社保预估费用到EKP错误"
,
e
);
}
log
.
info
(
"推送社保预估费用到EKP结束"
);
}
/**
* @Description: 预估数据推送
* @Author: huyc
* @Date: 2022-11-17
* @return: void
**/
@Async
public
void
asynchronousEkpForecastFund
(
EkpPushFundParam
fundParam
,
TForecastLibrary
library
)
{
log
.
info
(
"推送公积金预估费用到EKP-线程开始"
);
try
{
String
body
=
ekpFundUtil
.
sendToEKP
(
fundParam
);
if
(
Common
.
isEmpty
(
body
)
||
body
.
length
()
!=
32
)
{
body
=
ekpFundUtil
.
sendToEKP
(
fundParam
);
}
if
(
Common
.
isNotNull
(
body
)
&&
body
.
length
()
==
32
)
{
library
.
setDataPush
(
CommonConstants
.
ONE_INT
);
forecastLibraryMapper
.
updateById
(
library
);
}
else
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"公积金预估费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
body
);
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
}
}
catch
(
Exception
e
)
{
TSendEkpError
error
=
new
TSendEkpError
();
error
.
setCreateTime
(
new
Date
());
error
.
setCreateDay
(
DateUtil
.
getThisDay
());
error
.
setType
(
CommonConstants
.
TWO_STRING
);
error
.
setCreateUserName
(
"公积金预估费用推送"
);
error
.
setLinkId
(
library
.
getId
());
error
.
setTitle
(
e
.
getMessage
());
error
.
setNums
(
CommonConstants
.
ONE_INT
);
tSendEkpErrorService
.
saveError
(
error
);
log
.
error
(
"推送公积金预估费用到EKP错误"
,
e
);
}
log
.
info
(
"推送公积金预估费用到EKP结束"
);
}
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
eb21df7e
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
<result
property=
"keyGroup"
column=
"keyGroup"
/>
<result
property=
"keyGroup"
column=
"keyGroup"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ID,
a.EMP_NAME,
a.EMP_NAME,
a.EMP_NO,
a.EMP_NO,
a.EMP_ID,
a.EMP_ID,
...
@@ -446,8 +446,8 @@
...
@@ -446,8 +446,8 @@
<if
test=
"tPaymentInfo.createName != null and tPaymentInfo.createName.trim() != ''"
>
<if
test=
"tPaymentInfo.createName != null and tPaymentInfo.createName.trim() != ''"
>
AND a.CREATE_NAME = #{tPaymentInfo.createName}
AND a.CREATE_NAME = #{tPaymentInfo.createName}
</if>
</if>
<if
test=
"tPaymentInfo.createTime != null"
>
<if
test=
"tPaymentInfo.createTime
Start != null and tPaymentInfo.createTimeEnd
!= null"
>
AND a.CREATE_TIME
= #{tPaymentInfo.createTime
}
AND a.CREATE_TIME
BETWEEN #{tPaymentInfo.createTimeStart} AND #{tPaymentInfo.createTimeEnd
}
</if>
</if>
</if>
</if>
</sql>
</sql>
...
@@ -460,84 +460,90 @@
...
@@ -460,84 +460,90 @@
#{idStr}
#{idStr}
</foreach>
</foreach>
</if>
</if>
<if
test=
"tPaymentInfo.idList == null"
>
<if
test=
"tPaymentInfo.idList == null"
>
<if
test=
"tPaymentInfo.id != null and tPaymentInfo.id.trim() != ''"
>
<if
test=
"tPaymentInfo.id != null and tPaymentInfo.id.trim() != ''"
>
AND a.ID = #{tPaymentInfo.id}
AND a.ID = #{tPaymentInfo.id}
</if>
</if>
<if
test=
"tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''"
>
<if
test=
"tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''"
>
AND a.EMP_NAME like concat('%',#{tPaymentInfo.empName},'%')
AND a.EMP_NAME like concat('%',#{tPaymentInfo.empName},'%')
</if>
</if>
<if
test=
"tPaymentInfo.empNo != null and tPaymentInfo.empNo.trim() != ''"
>
<if
test=
"tPaymentInfo.empNo != null and tPaymentInfo.empNo.trim() != ''"
>
AND a.EMP_NO like CONCAT(#{tPaymentInfo.empNo},'%')
AND a.EMP_NO like CONCAT(#{tPaymentInfo.empNo},'%')
</if>
</if>
<if
test=
"tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''"
>
<if
test=
"tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD like concat('%',#{tPaymentInfo.empIdcard},'%')
AND a.EMP_IDCARD like concat('%',#{tPaymentInfo.empIdcard},'%')
</if>
</if>
<if
test=
"tPaymentInfo.settleDomainName != null and tPaymentInfo.settleDomainName.trim() != ''"
>
<if
test=
"tPaymentInfo.settleDomainName != null and tPaymentInfo.settleDomainName.trim() != ''"
>
AND a.SETTLE_DOMAIN_NAME = #{tPaymentInfo.settleDomainName}
AND a.SETTLE_DOMAIN_NAME = #{tPaymentInfo.settleDomainName}
</if>
</if>
<if
test=
"tPaymentInfo.settleDomainCode != null and tPaymentInfo.settleDomainCode.trim() != ''"
>
<if
test=
"tPaymentInfo.settleDomainCode != null and tPaymentInfo.settleDomainCode.trim() != ''"
>
AND a.SETTLE_DOMAIN_CODE = #{tPaymentInfo.settleDomainCode}
AND a.SETTLE_DOMAIN_CODE = #{tPaymentInfo.settleDomainCode}
</if>
</if>
<if
test=
"tPaymentInfo.unitName != null and tPaymentInfo.unitName.trim() != ''"
>
<if
test=
"tPaymentInfo.unitName != null and tPaymentInfo.unitName.trim() != ''"
>
AND a.UNIT_NAME = #{tPaymentInfo.unitName}
AND a.UNIT_NAME = #{tPaymentInfo.unitName}
</if>
</if>
<if
test=
"tPaymentInfo.settleDomainId != null and tPaymentInfo.settleDomainId.trim() != ''"
>
<if
test=
"tPaymentInfo.settleDomainId != null and tPaymentInfo.settleDomainId.trim() != ''"
>
AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
</if>
</if>
<if
test=
"tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''"
>
<if
test=
"tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''"
>
AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
</if>
</if>
<if
test=
"tPaymentInfo.socialSecurityNo != null and tPaymentInfo.socialSecurityNo.trim() != ''"
>
<if
test=
"tPaymentInfo.socialSecurityNo != null and tPaymentInfo.socialSecurityNo.trim() != ''"
>
AND a.SOCIAL_SECURITY_NO like CONCAT(#{tPaymentInfo.socialSecurityNo},'%')
AND a.SOCIAL_SECURITY_NO like CONCAT(#{tPaymentInfo.socialSecurityNo},'%')
</if>
</if>
<if
test=
"tPaymentInfo.socialPayAddr != null and tPaymentInfo.socialPayAddr.trim() != ''"
>
<if
test=
"tPaymentInfo.socialPayAddr != null and tPaymentInfo.socialPayAddr.trim() != ''"
>
AND a.SOCIAL_PAY_ADDR = #{tPaymentInfo.socialPayAddr}
AND a.SOCIAL_PAY_ADDR = #{tPaymentInfo.socialPayAddr}
</if>
</if>
<if
test=
"tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''"
>
<if
test=
"tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''"
>
AND (a.SOCIAL_PAY_MONTH = '${tPaymentInfo.socialPayMonth}' or a.PROVIDENT_PAY_MONTH = '${tPaymentInfo.socialPayMonth}')
AND (a.SOCIAL_PAY_MONTH = '${tPaymentInfo.socialPayMonth}' or a.PROVIDENT_PAY_MONTH = '${tPaymentInfo.socialPayMonth}')
</if>
</if>
<if
test=
"tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''"
>
<if
test=
"tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''"
>
AND (a.SOCIAL_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}' or a.PROVIDENT_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}')
AND (a.SOCIAL_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}' or a.PROVIDENT_CREATE_MONTH = '${tPaymentInfo.socialCreateMonth}')
</if>
</if>
<if
test=
"tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''"
>
<if
test=
"tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''"
>
AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
</if>
</if>
<if
test=
"tPaymentInfo.providentPayAddr != null and tPaymentInfo.providentPayAddr.trim() != ''"
>
<if
test=
"tPaymentInfo.providentPayAddr != null and tPaymentInfo.providentPayAddr.trim() != ''"
>
AND a.PROVIDENT_PAY_ADDR = #{tPaymentInfo.providentPayAddr}
AND a.PROVIDENT_PAY_ADDR = #{tPaymentInfo.providentPayAddr}
</if>
</if>
<if
test=
"tPaymentInfo.fundProvince != null and tPaymentInfo.fundProvince.trim() != ''"
>
<if
test=
"tPaymentInfo.fundProvince != null and tPaymentInfo.fundProvince.trim() != ''"
>
AND a.FUND_PROVINCE = #{tPaymentInfo.fundProvince}
AND a.FUND_PROVINCE = #{tPaymentInfo.fundProvince}
</if>
</if>
<if
test=
"tPaymentInfo.fundCity != null and tPaymentInfo.fundCity.trim() != ''"
>
<if
test=
"tPaymentInfo.fundCity != null and tPaymentInfo.fundCity.trim() != ''"
>
AND a.FUND_CITY = #{tPaymentInfo.fundCity}
AND a.FUND_CITY = #{tPaymentInfo.fundCity}
</if>
</if>
<if
test=
"tPaymentInfo.fundTown != null and tPaymentInfo.fundTown.trim() != ''"
>
<if
test=
"tPaymentInfo.fundTown != null and tPaymentInfo.fundTown.trim() != ''"
>
AND a.FUND_TOWN = #{tPaymentInfo.fundTown}
AND a.FUND_TOWN = #{tPaymentInfo.fundTown}
</if>
</if>
<if
test=
"tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != ''"
>
<if
test=
"tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != ''"
>
AND (a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}')
AND (a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}')
</if>
</if>
<if
test=
"tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != ''"
>
<if
test=
"tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != ''"
>
AND (a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}')
</if>
<if
test=
"tPaymentInfo.socialTown == null"
>
<if
test=
"tPaymentInfo.socialCity != null"
>
AND (a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}')
AND (a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}')
</if>
</if>
<if
test=
"tPaymentInfo.socialCity == null"
>
<if
test=
"tPaymentInfo.socialTown == null"
>
<if
test=
"tPaymentInfo.socialProvince != null"
>
<if
test=
"tPaymentInfo.socialCity != null"
>
AND (a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}')
AND (a.SOCIAL_CITY = '${tPaymentInfo.socialCity}' or a.FUND_CITY = '${tPaymentInfo.socialCity}')
</if>
<if
test=
"tPaymentInfo.socialCity == null"
>
<if
test=
"tPaymentInfo.socialProvince != null"
>
AND (a.SOCIAL_PROVINCE = '${tPaymentInfo.socialProvince}' or a.FUND_PROVINCE = '${tPaymentInfo.socialProvince}')
</if>
</if>
</if>
</if>
</if>
<if
test=
"tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''"
>
AND (a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' or a.FUND_TOWN = '${tPaymentInfo.socialTown}')
</if>
<if
test=
"tPaymentInfo.providentNo != null and tPaymentInfo.providentNo.trim() != ''"
>
AND a.PROVIDENT_NO = #{tPaymentInfo.providentNo}
</if>
<if
test=
"tPaymentInfo.createName != null and tPaymentInfo.createName.trim() != ''"
>
AND a.CREATE_NAME = #{tPaymentInfo.createName}
</if>
<if
test=
"tPaymentInfo.createTimeStart != null and tPaymentInfo.createTimeEnd != null"
>
AND a.CREATE_TIME BETWEEN #{tPaymentInfo.createTimeStart} AND #{tPaymentInfo.createTimeEnd}
</if>
</if>
</if>
<if
test=
"tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''"
>
AND (a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' or a.FUND_TOWN = '${tPaymentInfo.socialTown}')
</if>
<if
test=
"tPaymentInfo.providentNo != null and tPaymentInfo.providentNo.trim() != ''"
>
AND a.PROVIDENT_NO = #{tPaymentInfo.providentNo}
</if>
</if>
</if>
</if>
</sql>
</sql>
...
@@ -708,6 +714,17 @@
...
@@ -708,6 +714,17 @@
limit #{tPaymentInfo.limitStart},#{tPaymentInfo.limitEnd}
limit #{tPaymentInfo.limitStart},#{tPaymentInfo.limitEnd}
</select>
</select>
<!--tPaymentInfo不分页查询-->
<select
id=
"getTPaymentInfoList"
resultType=
"java.lang.String"
>
SELECT
a.ID
FROM t_payment_info a
<where>
a.LOCK_STATUS = '0' AND a.CREATE_BY = #{tPaymentInfo.createBy}
<include
refid=
"tPaymentInfo_export_where"
/>
</where>
</select>
<!--tPaymentInfo数量查询-->
<!--tPaymentInfo数量查询-->
<select
id=
"selectCountTPaymentInfo"
resultType=
"java.lang.Integer"
>
<select
id=
"selectCountTPaymentInfo"
resultType=
"java.lang.Integer"
>
SELECT
SELECT
...
@@ -1016,43 +1033,6 @@
...
@@ -1016,43 +1033,6 @@
</if>
</if>
</select>
</select>
<!--tPaymentInfo 查询缴费库要删除的数据-->
<select
id=
"selectListForDelete"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo"
>
select
<include
refid=
"Base_Column_List"
/>
from t_payment_info
<where>
1=1
<if
test=
"queryEntity != null"
>
<if
test=
"queryEntity.createUser != null and queryEntity.createUser.trim() != ''"
>
AND CREATE_BY = #{queryEntity.createBy}
</if>
<if
test=
"queryEntity.socialCreateMonth != null and queryEntity.socialCreateMonth.trim() != ''"
>
AND SOCIAL_CREATE_MONTH = #{queryEntity.socialCreateMonth}
</if>
<if
test=
"queryEntity.providentCreateMonth != null and queryEntity.providentCreateMonth.trim() != ''"
>
AND PROVIDENT_CREATE_MONTH = #{queryEntity.providentCreateMonth}
</if>
<if
test=
"queryEntity.settleDomainId != null and queryEntity.settleDomainId.trim() != ''"
>
AND SETTLE_DOMAIN_ID = #{queryEntity.settleDomainId}
</if>
<if
test=
"queryEntity.unitId != null and queryEntity.unitId.trim() != ''"
>
AND UNIT_ID = #{queryEntity.unitId}
</if>
<if
test=
"queryEntity.empIdcard != null and queryEntity.empIdcard.trim() != ''"
>
AND EMP_IDCARD = #{queryEntity.empIdcard}
</if>
<if
test=
"queryEntity.socialHousehold != null and queryEntity.socialHousehold.trim() != ''"
>
AND SOCIAL_HOUSEHOLD = #{queryEntity.socialHousehold}
</if>
<if
test=
"queryEntity.providentHousehold != null and queryEntity.providentHousehold.trim() != ''"
>
AND PROVIDENT_HOUSEHOLD = #{queryEntity.providentHousehold}
</if>
AND CREATE_TIME > DATE_ADD(curdate(),interval -day(curdate())+1 day)
</if>
</where>
</select>
<!--洪光武2022-8-10 18:05:42-->
<!--洪光武2022-8-10 18:05:42-->
<resultMap
id=
"tPaymentBySalaryMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo"
>
<resultMap
id=
"tPaymentBySalaryMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo"
>
<id
property=
"id"
column=
"ID"
/>
<id
property=
"id"
column=
"ID"
/>
...
...
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